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

Cumulative column sum by one continuous and one nominal variable

Unfortunately, I am having issues reproducing a formula column from a Graph Builder plot. There are manufactured quantities and concentration data of individual batches in the underlying dataset. In Graph Builder, I can plot concentration data (x) vs manufactured quantities (y) and pick "Cumulative Sum" from the Summary Statistic drop down menu. This gives me an OK overview of how much material of a given concentration range was manufactured in a year. (See the attached table & table scipt therein.) 

 

My questions

  • How can I recreate the y-axis using a column formula? (I have tried for a couple of hours now, but feel my cerebral capacity is insufficient to solve this. Walking around in circles:)
  • Is there any better way to visualize this data? I found this thread here explaining binning, but again I would have to summarize the manufactured quantities by the bins, which is something eluding me.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Cumulative column sum by one continuous and one nominal variable

If I am understanding your question correctly, all you have to do, is to sort your data by concentration, and then create a new column with the following formula

Col Cumulative Sum( :"Total production, all shifts [some weight quantity]"n, :Year )
Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Cumulative column sum by one continuous and one nominal variable

If I am understanding your question correctly, all you have to do, is to sort your data by concentration, and then create a new column with the following formula

Col Cumulative Sum( :"Total production, all shifts [some weight quantity]"n, :Year )
Jim
Ressel
Level VI

Re: Cumulative column sum by one continuous and one nominal variable

Edit: OK, this is working. Thank you. I believed it was not necessary to sort the table for the By Variable. Isn't the concentration a By Variable or am I understanding this incorrectly?

 

Sorry for my initial answer, which is now deleted.

txnelson
Super User

Re: Cumulative column sum by one continuous and one nominal variable

The Col Cumulative Sum() function accumulates row by row, for each specified By variable. Therefore you need to sort by Concentration, but not by Year.  You want the values to cumulate from low concentration to high concentration.  The Col Cumulative Sum() function handles the separation by Year.

Jim
Ressel
Level VI

Re: Cumulative column sum by one continuous and one nominal variable

It's still surprising that the Graph Builder manages this ad hoc, without sorting. Thank you for your help!