cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use JMP Live to centralize and share reports within groups. Webinar with Q&A April 4, 2pm ET.
Choose Language Hide Translation Bar
View Original Published Thread

cumulative sum

billi
Level V

Is there a simple way to  calculate the cumulative sum when there is a group and subgroup that are to be cumulative sum. Shown in the following picture, I want to calculate cumulative sum for batch 1 and all sample a, then batch 1 and all sample b and then batch 1 and all sample c.

billi_0-1612370427447.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
stan_koprowski
Community Manager Community Manager


Re: cumulative sum

HI @billi,

You can add a right-click formula column for cumulative sum.

Right-Click on a column and choose New Formula Column.

Choose Row--Cumulative Sum

 

JMP New Formula ColumnJMP New Formula ColumnEdit formula to add by variable using "^" insertEdit formula to add by variable using "^" insert

 

This will calculate the cumulative sum as shown in the image below.

Cumulative Sum with By variableCumulative Sum with By variable

I have attached a modified version of your data table with the included column formula.

cheers,

Stan

 

View solution in original post

3 REPLIES 3
dale_lehman
Level VII


Re: cumulative sum

From your description, it sounds like a simple tabulate will give you what you want (script in the attached file - with the batch changed to nominal data type).  However, if you want a formula for the cumulative sum, you can use the Cumulative Sum function (found in the Statistics functions) using both batch and sample as By variables (but that gives a running total by row, not the overall cumulative sum like the tabulation will give).

stan_koprowski
Community Manager Community Manager


Re: cumulative sum

HI @billi,

You can add a right-click formula column for cumulative sum.

Right-Click on a column and choose New Formula Column.

Choose Row--Cumulative Sum

 

JMP New Formula ColumnJMP New Formula ColumnEdit formula to add by variable using "^" insertEdit formula to add by variable using "^" insert

 

This will calculate the cumulative sum as shown in the image below.

Cumulative Sum with By variableCumulative Sum with By variable

I have attached a modified version of your data table with the included column formula.

cheers,

Stan

 

billi
Level V


Re: cumulative sum

@stan_koprowski Thank you Stan. This works perfectly.