Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i am trying to solve a problem but not having much luck!
i have 9 expressions in a cyclic group and a handful of dimensions (1 cyclic that contains 3 fields, and 2 standard dimensions).
what i want is to conditaionally show or hide the 2 standard dimensions based on the expression that has been selected from the cyclic group.
so for example,
Dimensions
Cyclic (Field A,B,C)
Dim A
Dim B
Expressions
Cyclic (containing the following)
>Volume
>Sales
i always want the cyclic dimension showing, but if the user was to select the expression cyclic group and choose 'Volume' then i would want Dim A to hide and Dim B to show.
if the user was to choose Sales from the cyclic expression then i would want to hide Dim A and show Dim B.
does anyone know if this is possible please?
Please load a sample
There is no easy way (except by using macros) to obtain the currently selected expression from a group. An expression group also doesn't have a label, so GetCurrentField() won't work.
However, you can build upon a workaround that was initially suggested by JohnW in How to get the used expression?. It goes as follows:
For getting the currently selected dimension from a cyclic group, you can use the following:
=GetCurrentField(DimensionGroupName)
which you can use to correctly label the following combined expression:
=IF (GetCurrentField(DimensionGroupName)='Sales', Sum(SalesData), Sum(VolumeData))
IF you keep two separate expressions, use conditional show expressions like:
GetCurrentField(DimensionGroupName) = 'Sales'
GetCurrentField(DimensionGroupName) = 'Volume'
Note: of course the fields in the new Cyclic group cannot have the same names as the Sales and Volume fields in your facts table.
Best,
Peter