Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Cumulative sum


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
MVP & Luminary
MVP & Luminary

Re: Cumulative sum

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