Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I use SecondaryDimensionality to calculate the variance between current year and prior year period.
My expression is the following:
=if(SecondaryDimensionality()<>1,
(sum({$<Year= {$(=Max(Year))},KPI= {'Sales'}>}Amount)- sum({$<Year= {$(=Max(Year)-1)},KPI= {'Sales'}>}Amount)),
sum({<KPI= {'Sales'}>}Amount))
I have to issues:
1. If I do not select a specific year than prior year is calculated as zero
2. If I select a year than prior year is multiplied by -1
Regrettably I cannot find the solution for this. Maybe someone can help me how to adjust the expression.
BR,
Hoerben
I think the expression is ok. but not the data-set or probably more likely the object. If you used such logic your object must not contain the Year as dimension respectively a field which includes the year like a YearMonth - with just only the Month it should be working.