That did it. Thanks! Here's the final script:
LET vYearCurrent = Year(Today());
LET vYearPrevious = Year(YearStart(Today())-1);
LET vYearPreviousX2 = Year(YearStart(Today())-2);
LET vMonthCurrent = Month(Today());
LET vMonthPrevious = Month(MonthStart(Today())-1);
LET vMonthPreviousX2 = Month(MonthStart(Today())-2);
Hi. Im quite newbie in QlikSense after working in QlikView. I try to use variables but somehow it doesnt work the way i was working in QlikView.
I want to write expression showing sum of sales for previous year but expresion like
Sum(if(YEAR=vYearPrevious,Sales)) doesnt work.
How am I supposed to use it? I pasted variables from this discussion to Script and reloaded app.
Thanks in advance for help