Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have wrote the code of Previous Year in set it show previous year in set expression but data show of current year..
what will be the issue...
sum({<FYear=$(=Max(FYear-1)Amount)
I am amazed that it is showing you anything because syntax is not right. Try this:
=Sum({<FYear = {'$(=Max(FYear)-1)'}>} Amount)
Nopes.. i have wrote so here got syntax mistake.. but i took in variable also it shows me previous year.. but data & total is coming of current year..
just let me know one thing.. is selected Year field will be in Variable field
in selection box i have field name called FYear
in Expression i am comparing with FYear = {'$(=Max(FYear)-1)'}>}
so is that correct.. in variable i m creating like Max(FYear)-1
What is your chart dimension? Is it FYear by any chance?
i am selecting FYear on top .. my dimension is Customer Name
So yes, you can create a variable vPreviousYear = '=Max(FYear) - 1' (Everything within the single quotes need to be in your variable)
and then use it like this:
=Sum({<FYear = {'$(vPreviousYear)-1)'}>} Amount)