Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
laurilahti
Contributor II
Contributor II

Cumulative sum in right order

Hi all

 

I have table with values LoadID, value, event_order_id and I'm trying to have cumulative sum / loadid in correct order / cirteria as in the example below.

The calculation for the cumulative sum for LoadID 413465 should go like this.

when event_order_id = 1 the sum is value,

when event_order_id = 2 the sum is value of the id 1 + value of the id 2

when event_order_id = 3 the sum is value of the id 1 + value of the id 2 + value of the id 3

LoadIDvalueevent_order_idcumulative sum / loadid
41346511,845111,845
413465-0,336211,509
413465-11,50930,000
4134903,61613,616
4134908,125211,741
413490-6,98234,759
413490-1,14343,616
413490-3,61650,000
4135077,85317,853
4135071,25929,112
413507-1,25937,853
4135071,14945,488
413507-2,36553,123
413507-3,3406-0,217
413507-2,2177-2,434
413507-1,0808-3,514

Is the some kind of aggr / range sum function that I should use or some kind of Do while ... loop

10 Replies
GNA4
Contributor
Contributor

Hi Sunny,

Am in a similar situation but I am doing in a Vizlib Table with 1 dimension called Brand,

sorting is working only if I remove the cumulative calculation from the table

Thanks,

Nagarjun