Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have scenario as -
Dimension names as year
Year |
---|
2011 |
2012 |
2013 |
2014 |
But it is not static, it will increase in 2015.
I need calculated dimension as only last two year like -
New_Year |
---|
2013 |
2014 |
How do i will do that?
Kindly advise.
Regards,
mahamed
You can either use a calculated dimensions
=Aggr( If(Year >= Max(TOTAL Year)-1,Year), Year)
or use a set expression in all your expressions, like
=Sum({<Year = {">=$(=Max(Year)-1)"}>} Value)
edit:
Your calculated dim could also just like
=If(Year >= $(=Max(Year))-1, Year)
of course.
May be this as your calculated dimension:
If(Match(Year, Max(TOTAL Year), Max(TOTAL Year) - 1), Year)
Please try
=Aggr(Only({<Year={">=$(=Max(Year,2))"}>}Year),Year)
Hi Mahamed Khan, you can do this:
In 'Calculated dimension' put this expresion:
if(YEAR='2013' or YEAR='2014', YEAR)
of
if( year(today())-1= YEAR or year(today())-2= YEAR , YEAR) // with this example you always will see the last two years
Regards,
Agustín
Hi Mahamed Khan,
To get the last two years in the data you can use the dimension as :
=if(Year >= Max(Total Year)-1,Year)
Regards,
Anjali Gupta
Hi,
Try this code in calculated dimension.
=if(aggr(rank(Year)<=2,Year),Year)
It is working.. Make sure you do check Suppress null values on dimension tab.
Regards
Suman
Hi,
Try this code in calculated dimension.
=if(aggr(rank(Year)<=2,Year),Year)
It is working.. Make sure you do check Suppress null values on dimension tab.
Regards
Suman