Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jbird
Contributor
Contributor

Straight Table Cumulative sum by dimension

Hello,

I am having challenges using the rangesum( above function. I have a straight table with 5 dimensions. I have a simple sum for all of my values (entrees) in one column. Next to it, I'm trying to calculate a cumulative sum but only aggregated by the first dimension in the table. The TOTAL function is giving me the sum for the entire column and not restarting when the first dimension changes. I've copied a picture with some of the formulas that I am running. I've highlighted in yellow where the cumulative sum needs to start over. I need it to end at 147 and start over with 1. Help is much appreciated.

Capture.JPG

Labels (3)
4 Replies
chrismarlow
Specialist II
Specialist II

Hi,
Is it not just a case of taking out the TOTAL from RowNo(TOTAL)?
https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...
Cheers, Chris.
jbird
Contributor
Contributor
Author

Thanks for the reply Chris, but unfortunately that does not work either. Below is an image of the output; it essentially gives me the same as sum(entrees).

I tried another formula: 

If( above( total unique_id)=unique_id, rangesum( entrees, above(total entrees)),1)

However, this only sums up the current row and one row above, not the cumulative rows above with the unique_id.Capture2.JPG

chrismarlow
Specialist II
Specialist II

Hi,

That is odd, there must be something different between the data you have and the set I put together to try to check it;

20190704_1.png

Attaching QVW.

Cheers,

Chris.

 

chanti126
Contributor
Contributor

Hello Jbrid, 

Have you found the solution for this If so could please let me know now i am facing the same iisue.

 

Thanks in advance !