3 Replies Latest reply: Mar 23, 2018 2:28 AM by Tim Müller RSS

    Accumulation Year-over-Year e.g. YTD

    Tim Müller

      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