Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There
I would like to create a variable for max(Day) and Max(Year)
I have a dashboard and I have the current year sales figures
I also have last year sales figures I want to compare the two YTD so in my set analysis of the previous year I want to use a variable
to tell it to give me the sales figures for last year but only up until this years Max(Day)
what is the best way to do this?
I hope this makes sense...
Regards
Create a variable vMaxDay as =max(Day) and a variable vMaxYear as =max(Year).
You can use these variables in set analysis expressions.
Current: sum(Amount)
Previous year: sum({<Year={$(=vMaxYear-1)},Day={'<=$(=vMaxDay-1)'}>} Amount)
I have used =(Day(today()-1)) as my variable vCurrentDay and then used this in my set analysis
seems to work well... do you see any Issues I may have from doing it this way Gysbert?