Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
mee-qlik
Partner - Contributor
Partner - Contributor

Pivot table: cumulative sum on a dimension

In a pivot table with 3 dimension and 1 expression my goal is to have the sum of "valore" in R2 group (ok) and the cumulative sum in R1 group. In the test file i would like that the value in R1 group "MARGINE COMMERCIALE" is the sum not only of the appropriate group but even of the previus group "MARGINE DIRETTO".

In the same way, the "MARGINE OPERATIVO LORDO" i would like that is the sum of the previous "MARGINE DIRETTO" , MARGINE COMMERCIALE group and MARGINE OPERATIVO LORDO group.

This is only a small part of the ricorsive sum

Thank

Enrico

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=If(Dimensionality() <> 1, Sum(VALORE), Aggr(RangeSum(Above(Sum(VALORE), 0, RowNo())), R1))

Capture.PNG

View solution in original post

7 Replies
sunny_talwar

Is this the goal?

Capture.PNG

I used this:

RangeSum(Above(TOTAL Sum(VALORE), 0, RowNo(TOTAL)))

mee-qlik
Partner - Contributor
Partner - Contributor
Author

Not exactly. The cumulative sum that i want is a cumulative sum ONLY of group R1, see below where i put the goal value in E column and the excel formula in F column


sunny_talwar

Try this:

=If(Dimensionality() <> 1, Sum(VALORE), Aggr(RangeSum(Above(Sum(VALORE), 0, RowNo())), R1))

Capture.PNG

mee-qlik
Partner - Contributor
Partner - Contributor
Author

Perfect!!!

Thank you!

sunny_talwar

I am glad I was able to help, but it would be better if you can mark the response which actually helped you get what you wanted, instead of marking your own response here.

Best,

Sunny

mee-qlik
Partner - Contributor
Partner - Contributor
Author

Yes, sorry

Marked the correct answer.

Thank you again.

Best

Enrico

sunny_talwar

Thank you