Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Condicional Expression - Last expand

I have a expression that is conditional and only appear when I expand the last column of dimension, how to do this? Thanks.

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Say you have 3 dimensions in the pivot table and your expression to only calculate if the last one is expanded is Sum(Sales)....

Instead of Sum(Sales) as the expression, use:

If(Dimensionality()=3,Sum(Sales))

The third part of the IF() statement (the ELSE bit) is absent (Null) so the expression shouldn't appear at all.

View solution in original post

6 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

If(Dimensionality()=YourLastDimensionNumberHere,YourExpressionHere)

Hope this helps,

Jason

Not applicable
Author

Thanks, but i put this expression in condicional field?

Not applicable
Author

You can give me someone example (qvw file)?

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Say you have 3 dimensions in the pivot table and your expression to only calculate if the last one is expanded is Sum(Sales)....

Instead of Sum(Sales) as the expression, use:

If(Dimensionality()=3,Sum(Sales))

The third part of the IF() statement (the ELSE bit) is absent (Null) so the expression shouldn't appear at all.

Not applicable
Author

OK, but the column don't disappear, i think with this function the column with expression just appear when dimensionality() = 3...

Jason_Michaelides
Luminary Alumni
Luminary Alumni

You could try adding in the Null bit -

If(Dimensionality()=3,Sum(Sales),Null())