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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
gitguto
Contributor III
Contributor III

Accumulative Sum reseting in a new year

Hello community,

I need to create a field with the accumulated (month by month) sum of the measure sum(ESTOQUE).

I tried using the RangeSum(Above([MEASURE],0,RowNo(TOTAL))) method, but something is not working, as you can see in the image below, the accumulation sum resets when it reaches January of a new year. I thought this should be fixed with the argument TOTAL inside the RowNo function, but it does not work somehow.

=RangeSum(Above(Sum({$<[CALDAY.autoCalendar.YearMonth]>} ESTOQUE),0,RowNo(TOTAL)))

 

gitguto_1-1628379497983.png

Does anyone has a clue of what is wrong?

 

1 Solution

Accepted Solutions
MayilVahanan

Hi 

Try like below

=RangeSum(Above(Total Sum({$<[CALDAY.autoCalendar.YearMonth]>} ESTOQUE),0,RowNo(TOTAL)))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

Hi 

Try like below

=RangeSum(Above(Total Sum({$<[CALDAY.autoCalendar.YearMonth]>} ESTOQUE),0,RowNo(TOTAL)))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
anthonyj
Creator III
Creator III

Hi,

It's an interesting question. I tried this with a date using the autocalendar Year in one column and the Month in the other just as your example and it did the exact same thing. But when I only used the autocalendar.YearMonth column it worked as expected accumulating through all the rows.

Maybe someone can explain why this would be the case.

Regards

Anthony

gitguto
Contributor III
Contributor III
Author

Thank you Mayil!

 

It worked perfectly.