Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative sum

Hi Community,

PFA

how to calculate cumulative sum..

Thanks in Advance

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can calculate it in the script like this:

Table:

LOAD [customer Id],

     product,

     D.O.P,

     [Bill Amount],

     Region,

     rangesum([Bill Amount],peek('Cumulative')) as Cumulative

FROM

comm95418.xlsx

(ooxml, embedded labels, table is Sheet1);

If you want to do it with an expression in a chart you can use rangesum(above(total sum([Bill Amount]),0,RowNo(total)))


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

You can calculate it in the script like this:

Table:

LOAD [customer Id],

     product,

     D.O.P,

     [Bill Amount],

     Region,

     rangesum([Bill Amount],peek('Cumulative')) as Cumulative

FROM

comm95418.xlsx

(ooxml, embedded labels, table is Sheet1);

If you want to do it with an expression in a chart you can use rangesum(above(total sum([Bill Amount]),0,RowNo(total)))


talk is cheap, supply exceeds demand
Not applicable
Author

Hi

for straight table u can use accumulation in expression tab.

use rangesum and above functions

rangesum(above(total sum({1}Amount),0,3))

sudeepkm
Specialist III
Specialist III

As Aryabrahma mentioned you can use the Full accumulation in the Chart Expression properties. As shown below.

accumulation.png