Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

New Contributor III

Accumulation Year-over-Year e.g. YTD

Hi Qlikers,

I accumulate my sales with this formula:

rangesum( above( sum([Expression1]),0,rowno()))

But I need to implement a second measure to get a second stream in my visualization that displays the Year-over-Year e.g. YTD Figures from the last year e.g. the last month.

I have problems to define this second measure: I am aware that I need to implement something like this (I read it in the community):

=Sum({$<Date = {'>$(=Max((YearStart(Date)))) <=$(=Max(Today()))'}>} sales)

But at which point in my second measure do I have to insert this? That means additionally, that I have to complete my first measure ((This ist my first measure: rangesum( above( sum([Expression1]),0,rowno())))) with an additional information about the actual year.

Furthermore when I want to calculate the previous month, except the issue accululation, I get wrong figures: Here my expression:



Both shows the same chart in my dashboard, although the data in 2016 is different to the data in 2017, I am helpless.

Can you help me to put together my first measure with the information about the actual YTD-Information and the second to display the sales from the last period e.g. last year or last month and explain me, why I get the same chart in my 2017 and 2016 expression?


Regards, Tim

3 Replies
Valued Contributor

Re: Accumulation Year-over-Year e.g. YTD

Try to post some data and the output expected ...


Re: Accumulation Year-over-Year e.g. YTD

Tim - are you able to share some sample data and explain what you are looking to get from it?

New Contributor III

Re: Accumulation Year-over-Year e.g. YTD

‌Thanks for your post. What kind of sample Data do you mean? In my facts table I have tables like to show months and year. I need help in set analysis to insert a formula like the first one but with additional context that figures the previous year. I am a novice in qlik

Community Browser