Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a variable CurrYear to denote the Current Year. I have used it in Set Analysis to sum data where Year=CurrYear.
I have even included it in the labels in my chart to e.g. 'Sales '&$(CurrYear)
I have also shown previous year in label using 'Sales '&(num($(CurrYear))-1)
Now I want to use Set Analysis to sum data for last year. I hoped to use some version of the formula above
(ie num($(CurrYear))-1), but it does not seem to work.
What is my problem?
Try with
sum ({<Year={$(=num($(CurrYear)-1))>} Sales)
OR create a new variable PrevYear=num($(CurrYear))-1)
and then
sum({<Year={$(PrevYear)}>} Sales)
Many thanks