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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative sum

Hello!

I have a problem to calculate a cumulative sum.

My database contains 18 months of data, so it is in 2 years (2015 and 2016)

I wish, when I select ONLY the month of April, the amount displayed is the sum of January, February, March and April.

Sum({$<[Temps Arrete] ={">$(=yearstart([Temps Arrete])) <=$(=[Temps Arrete])"}>}[Montant Loyer])

First problem:

With this formula, the selected month is not included in the sum

(Example: if I select April, I get the sum of January, February, March)

Second problem:

When I click in December 2015 and January 2016, the sum between 2015 and January 2016 is always calculated, or it is a sum of the year I need. How should I do it to say that the sum ends in December?

Thank you for your response

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps this blog post can help you: Relative Calendar Fields

If not an As-Of table might help: The As-Of Table & Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand