3 Replies Latest reply: Feb 6, 2014 8:04 AM by Fabrice Aunez RSS

    Are YTD calculations so difficult or am I missing something?

    Angelos Vlisidis

      Hello to all qlikers,

      In the attached file is a very simple sales report. My problem is that I cannot create an expression to calculate the YTD Sales.

      The expression used is :


      sum({$<Month={"<=$(=max(Month))"}, Week={"<=$(=max(Week))"}>}TOTAL<Market> Value)

      I used the TOTAL<Market> modifier to instruct qlik to ignore the dimension values of Month & Week when calculating the sum,otherwise no matter what I declare in the set expression Month & Week are filtered on the row values.

      The wrong part, I suppose, is the use of $(=max(Month)) and $(=max(Week)) to get the current Month & Week dimesion values for each row, but I don't know the correct way. When using just $(=(Month)) the sum returns always 0.

      Any bright ideas?