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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

cumulative sum with descending order

Hi Experts,

Hope everything fine!

I'm facing couple of issues on cumulative sum (default cumulative sum working fine from top to bottom, but my requirement is it should be descending order cumulative).

Ex: 

ID  Sales
QlikView 100
PBI 50
Tableau 150
Spotfire 120

Output would be:

ID  Sales Cumulative Sum
QlikView 100 370
PBI 50 420
Tableau 150 150
Spotfire 120 270

Can you give a try please for me ?

Thanks in Advance!

Labels (1)
13 Replies
tresesco
MVP
MVP

Yes, one way is using labels, like:

If([Group Total]<>Above([Group Total]), RangeSum(Above(Total Cummulative), [Group Total]),Above(Total Cummulative))

I posted there in the orig. post as well.

tresesco_0-1679047596015.png

 

Note: Please like and mark correct answers to close the thread; that also helps others looking for solutions to similar issues.

tresesco
MVP
MVP

Add 'nodistinct' in aggr(), like:   Aggr( Nodistinct ...

tresesco
MVP
MVP

Your sort order is Site_Sales, you have to correct that; use sum(Site_Sales) and play a bit to adjust to handle the  cases of conflicts