Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Marcus have help me with the below script , which work fine for Qlik Sense because in QS it does not encourage user to select month and year.
LY YTD =
sum({$<eXP={'eXP'}, date={">=$(=num(AddYears(YearStart(Today()), -1)))<=$(=num(AddYears(Today(), -1)))"}>} Amount)
YTD =
sum({$<eXP={'eXP'}, date={">=$(=num(YearStart(Today())))<=$(=num(Today()))"}>} Amount)
Now i want to implement the similar script in Qlik View , which allow user to select month and year.
I hope some one can help me convert the above script into more dynamic script , which allow to allow user change the month and year. Meaning can select month =12 and year = 2013 for view the sales change from 2012 to 2013.
Paul
May be this:
LY YTD =
sum({$<eXP={'eXP'}, date={">=$(=num(AddYears(YearStart(Max(date)), -1)))<=$(=num(AddYears(Max(date), -1)))"}, year =, month =>} Amount)
YTD =
sum({$<eXP={'eXP'}, date={">=$(=num(YearStart(Max(date))))<=$(=num(Max(date)))"}, year =, month =>} Amount)
Update: add year =, month = as well
Hi All
Enclosed my QV doc
May be this:
LY YTD =
sum({$<eXP={'eXP'}, date={">=$(=num(AddYears(YearStart(Max(date)), -1)))<=$(=num(AddYears(Max(date), -1)))"}, year =, month =>} Amount)
YTD =
sum({$<eXP={'eXP'}, date={">=$(=num(YearStart(Max(date))))<=$(=num(Max(date)))"}, year =, month =>} Amount)
Update: add year =, month = as well
See if the attached is what you were looking for.
Best,
Sunny