5 Replies Latest reply: Nov 26, 2009 2:56 PM by Miguel Angel Baeyens de Arce RSS

    Calculate 18 month rolling


      Dear all,

      I tried to calculate a sum of a value during the last 18 month, but I think I'm doing something terribly wrong. ;)

      My code to calculate the value is the following:



      ({<REPORTDAT_date = {'>=$(=AddMonths(makedate( (=Only(YEAR)), '04', '01' ), -18))<=$(=makedate( (=Only(YEAR)), '03', '31' ))'}>} REPORTNRCOUNT)

      If I select a year I receive only the calculated value of the selected year, not the value of 18 month. I'm using QlikView 8.5 and the editor always says that the expression is OK.

      Could you please help me to find the cause of my error? I think it has to do something with the $ sign?

      Thank you in advance for your help!!

      Best regards,