Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We have a standard YTD expression-
sum({<date=,Year=,Month=,Quarter=, date={">=$(=YearStart(Max(date)))<=$(=Max(date))"}>}Sales)
which is for sum of sales.
My doubt was that we have put date=, which means qlik has to ignore any current selections of Date.
Then later on we are calculating a range of date as in date={">=$(=YearStart(Max(date)))<=$(=Max(date))
this part of the expression.
So if qlik has to ignore the selection of date, how can it calculate YTD since YTD needs a starting date, for example for 14-02-2022 , YTD would be sum of sales from Jan -22 to 14th Feb 2022.
The date= modifier applies to the Sum(Sales). There is no set modifier in the Max(date) expression, hence Max(date) will operate on the current selections.
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com