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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RighettiAndrea
Contributor III
Contributor III

Cumulative sum in chart

Hi everyone,
I know that this is a post very similar to others I already red, but in my case there is something still wrong...

I have a bar chart where I'd like to see the cumulative sum of a value (Fon - Prog Stamp). The X axis is showing the weeks (Settimana) of the selected time range, while dividing the measure I put into other bars (Isola).

RighettiAndrea_0-1591966836689.png

 

The functions I'm using for this measures are the same as in another post I saw here (and in that case they run).

Here's my measure:

RangeSum(Above(Sum(S_ODL.LORDO_FONDERIA/DT_ARTICOLI.PZZBATT),0,RowNo()))

I've also tried to replace RowNo() with the week dimension but nothing at all, the measure still shows the calculation without adding the previous values. I think I need the Aggr function but I'm not able to use it properly in this case. In fact, I noticed that removing the bar dimension (Isola), the function runs correctly...

Thanks a lot

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum(Aggr(
    RangeSum(Above(Sum(S_ODL.LORDO_FONDERIA/DT_ARTICOLI.PZZBATT), 0, RowNo()))
, Isola, Settimana))

View solution in original post

2 Replies
sunny_talwar

Try this

Sum(Aggr(
    RangeSum(Above(Sum(S_ODL.LORDO_FONDERIA/DT_ARTICOLI.PZZBATT), 0, RowNo()))
, Isola, Settimana))
RighettiAndrea
Contributor III
Contributor III
Author

YOU ARE AMAZING, MAN!

It works great! Thanks a lot!!