I'm trying to use a script (which I've successfully implemented with QlikView) in Qlik Sense. Basically I need to store a few variables for Year and Month (current, previous, etc). Here's the script I'm using:
LET vYearCurrent = Year(Today());
LET vYearPrevious = Year(Today())-1;
LET vYearPreviousX2 = Year(Today())-2;
LET vMonthCurrent = Month(Today());
LET vMonthPrevious = Month(Today())-1;
LET vMonthPreviousX2 = Month(Today())-2;
For some reason Sense stores "Sep" for the value of vMonthCurrent but "8" for the value of vMonthPrevious. As a result I'm only able to use the vMonthCurrent variable in my visualization and not the vMonthPrevious variable.
Any ideas how to get Sense to not store the vMonthPrevious variable value as numeric?