Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an input variable (V1) where the default value is 2022-05. And I wanna create a subsequent variable to create a range of months from V1. Here it is what I`m trying to do:
Addmonths($(v1),-11)
the expected value should be 2021-06, eleven months earlier, but instead I`m getting 1904-08. Somebody can help me, I don`t understand why Qlik is changing the value. something important is that in the data load editor the date format is SET DateFormat='YYYY-MM';
Thank you
My bad, actually interpretation is not needed as the format is 'YYYY-MM' is updated in the script as mentioned by @MaryanVegaC .
Addmonths('$(V1)',-11) - This also works, so Date/Date# are not needed
Looks like $(V1) is not interpreted as date, this works -
Addmonths(Date('$(V1)','YYYY-MM'),-11)
@Digvijay_Singh I think you mean Date# ?
-Rob
My bad, actually interpretation is not needed as the format is 'YYYY-MM' is updated in the script as mentioned by @MaryanVegaC .
Addmonths('$(V1)',-11) - This also works, so Date/Date# are not needed
Thanks @rwunderlich and @Digvijay_Singh for your help 🙂