Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
AndriyShepel
Contributor II
Contributor II

Running totals in stacked bar chart

Hi folks

I am struggling  in making the correct calculation of the running totals sub in stacked bar chart.

In the attached qvw file you will see the correct (expected calculation) of the total running sums per day, however, if I add another region dimension, the calculations are completely wrong (seems, something is happening with the date/region sorting)

The one above - expected calculations, the one below - incorrect

AndriyShepel_0-1728469052916.png

 

The expression which is used for the running totals is the following:

sum(Amount)+RangeSum(TOP(sum(Amount), 1, RowNo()-1)) 

 

Let me know please if someone has an idea how to deal with this

Thanks!

 

 

 

Labels (1)
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=Aggr(RangeSum(Above(sum(Amount), 0, rowno())), Region, Date)

View solution in original post

1 Reply
MK_QSL
MVP
MVP

=Aggr(RangeSum(Above(sum(Amount), 0, rowno())), Region, Date)