Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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