cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ConnerOakes
Level I

Cumulative Sum of Rows

JMP Pro 17

I have pulled minute data over 20 days (28,800 rows = 24*60*20). I want to sum each day's data and see that displayed in a new column. Basically, I want to see a cumulative sum for every 1440 rows (24*60). Is that possible or should I just transfer the data to excel? I want to see the cumulative total for each day so 20 values.

3 REPLIES 3
jthi
Super User

Re: Cumulative Sum of Rows

Create new column to indicate your days, then use Col Sum() and use that new column as byVar. If you just need those 20 values then you could also use that just created day column with Summary or Tabulate to calculate the sums

-Jarmo
dale_lehman
Level VII

Re: Cumulative Sum of Rows

Another way is to create a column of 1s (just the number 1) and then use the ColCumulSum function with day as a By grouping variable.  You probably also need a column for each day (using the Day function operating on the date).

FN
FN
Level VI

Re: Cumulative Sum of Rows

To do aggregations in new tables, you can either use tabulate in the Analysis menu or Summary tables. Personally, I do these operations in Graph Builder most of the time.

 

To keep everything in one table, unlike Excel, your calculation will be created in a new column entirely. 

 

  • To sum a number of X, you can use either Col Sum() for totalizers or Col Cumulative Sum() for counters. You can create a new column with only ones as numbers to sum  [1,1,1,1], or put it directly in the formula.

 

Here I am obtaining the year from a date column and counting how many rows I have (in total or accumulated).

FN_0-1681997647875.png

 

The file is attached.