Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik community,
i want to make the difference from the selected year and the year before.
Example:
I filter the year 2020 and then i want to calculate a meassure that gives me a difference from 2020 to 2019. the best would be Year-to-Date.
what can the formula for the meassure look like?
Thanks in advance.
Hi
Try this
if you want to remove -ve sign you can use FABS() Function
Sum({<Date={">=$(=YearStart(Max(Date)))<=$(=Max(Date)"}>}Sales)
-
Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=AddYears(Max(Date),-1))"}>}Sales)
Hope this helps
Thanks
Hi
Try this
if you want to remove -ve sign you can use FABS() Function
Sum({<Date={">=$(=YearStart(Max(Date)))<=$(=Max(Date)"}>}Sales)
-
Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=AddYears(Max(Date),-1))"}>}Sales)
Hope this helps
Thanks
Thank you for your answer. It works.