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: 
LoretaS
Contributor II
Contributor II

Cumulative sum in Pivot table

Hi,

I have a pivot table with acq.date and collections for each month after acq. date (M_Vintage)

I would like to calculate cumulative sum for each line means horizontally.

2024-09 should be 23,3K, 23,3K+15.7K, 23.3K+15.7K+62.7K and etc.

If I use formula rangesum(above(sum(colltotal),0,RowNo())) I get column sums, not row.

Is it possible to do cumulative row?

LoretaS_0-1741092205899.png

 

Labels (2)
1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi 

Your expression will not work with above and rownow 

The expression should be changed to respect that:

  • Above becomes Before
  • RowNo becomes ColumnNo

 

Rangesum(Before(Sum(colltotal),0,ColumnNo()))

Regards 

 

View solution in original post

4 Replies
brunobertels
Master
Master

Hi 

Your expression will not work with above and rownow 

The expression should be changed to respect that:

  • Above becomes Before
  • RowNo becomes ColumnNo

 

Rangesum(Before(Sum(colltotal),0,ColumnNo()))

Regards 

 

LoretaS
Contributor II
Contributor II
Author

Thanks it works!

LoretaS
Contributor II
Contributor II
Author

I have another question related to this table.

Is it possible to create line chart with two dimensions? X axis would be M_vintage, and each line Capex Date. 

On Y axis cumulative performance. I manage to do only on montly inflow, but not cumulative.

LoretaS_0-1741162129377.png

 

brunobertels
Master
Master

Hi 

Line or bar chart works as a straight table so then use above and rowno instead of before and column. 

Regards