Choose Language Hide Translation Bar
Highlighted
dileepkr
Level III

Rolling cumulative sum by groups of column entries

Hi,

 

I am trying to create the cumulative sum column as shown in the table below. 

When I use the Col cumulative sum( value) directly, it gives cumulative sum for entire value column. Can anyone please help me understand how to calculate the cumulative sum for groups of Type as shown in table below?

 

NameTypevaluecumulative sum
AAAT111
AAAT11011
AAAT13243
AAAT1447
AAAT222
AAAT235
AAAT2510
AAAT2616
BBBT13232
BBBT13466
BBBT1571
BBBT167138
BBBT23434
BBBT23266
BBBT2773
BBBT2881

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Rolling cumulative sum by groups of column entries

Use the by capability within the Col Cumulative Sum() function.

col cumulative sum(:value, :Name, :Type);
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: Rolling cumulative sum by groups of column entries

Use the by capability within the Col Cumulative Sum() function.

col cumulative sum(:value, :Name, :Type);
Jim

View solution in original post

Highlighted
dileepkr
Level III

Re: Rolling cumulative sum by groups of column entries

Thank you for quick and precise answer :)
Article Labels

    There are no labels assigned to this post.