Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When attempting to use the following QlikView expression in QlikSense, I get an error:
expression:
='Viewing '&%DateType&' '&%Period&' for '&
IF(%Period='Month to Date',ONLY({<MonthID= {$(=Max({$}MonthID))}>}$(=%Year)&'-'&$(=%MonthDisplay)),
IF(%Period='Quarter to Date',ONLY({<MonthID= {$(=Max({$}MonthID))}>}$(=%Year)&'-'&$(=%Quarter)),
IF(%Period='Year to Date',ONLY({<MonthID= {$(=Max({$}MonthID))}>}$(=%Year)))))
Error:
see screenshot attachment
Hi @ms206147,
the error seems to lie in the expression $(=%Year). If you look at the evaluated formula you'll see a dash instead of - what i'm guessing - should be a field name.
Try replacing Only() with Max() or MaxString() if those values are loaded as text
Thanks all.
The solution was to remove the $ and the = for the year and month.