cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
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

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
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

txnelson
Super User

Re: Rolling cumulative sum by groups of column entries

Use
Tables=>Summarize
Using your m/y column as the grouping column, and nothing else as the statistics column. The result will give you a data table that can be plotted where # Rows is the count of projects for that m/y
Jim

View solution in original post

5 REPLIES 5
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
dileepkr
Level III

Re: Rolling cumulative sum by groups of column entries

Thank you for quick and precise answer :)
pswilliams
Level I

Re: Rolling cumulative sum by groups of column entries

Hi txnelson - I'm trying to do a very similar task, however I'm missing something basic.  

 

I have a list of projects with columns for date_start, status, description, etc. 

 

I would like to create a graph demonstrating a cumulative total of "Active" projects, grouped by m/y.  I see this as basically a running count function grouped by date. (starting date format if d/m/y and spans multiple years)

 

I created the m/y column for grouping, but I haven't been able to graph the count of projects organized by the m/y group. I think I'm missing something basic. 

 

If there is a scripting solution, I will need a guide as to how to input it as I'm not experienced with JSL.  

 

Thanks

 

 

txnelson
Super User

Re: Rolling cumulative sum by groups of column entries

Use
Tables=>Summarize
Using your m/y column as the grouping column, and nothing else as the statistics column. The result will give you a data table that can be plotted where # Rows is the count of projects for that m/y
Jim
pswilliams
Level I

Re: Rolling cumulative sum by groups of column entries

Thanks! This worked perfectly.