Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having year as Dimension and want to restrict it upto max two values....
Example: say, I am having 2013,2014,2015,2016....
on the base of selection of master calender it shud give me max two value, in common words like CY vs PY.
How I can do it at dimension level??
Regards,
Balraj Ahlawat
you want to create a variable for previous year and in chart you have to use that variable in expression
then create a input box and call that variable in the inbut box
I have defined a variable into Variable overview named VPY
now at dimension level I am using
If(year>=VPY, year)..
But its not working
If you define the variable like this:
=(Max(year) - 1)
(where the = sign is part of the variable defintion),
Then you can use it in the way you tried. If the defintion does not include the = sign, then you would need:
If(year >= $(VPY). ....
Jonathan,
I have already tried this but no success..
PFA..
Hi,
Try like this
Dim : year
Expression: =sum({<year={'>=$(=Max(year) -1)<=$(=Max(year))'}>}sales)
Regards,
Jagan.
OR
No dimension:
Expression:
Current Year : Sum({<year={'$(=Max(year) -1)'}sales)
Previous Year : Sum({<year={'$(=Max(year))'}sales)
Hope this helps you.
Regards,
Jagan.
use calculated dimension as below
=aggr(Only({<year={">=$(=max(year)-1)"}>}year),year)
check suppress when values is NULL
see the attached
PFA. You nneded a preceding '=' in the variable definition.
Jagan,
At expression level I have tried same and it was working.
But I want to try at Dimension level not expression level.