Hi All!
Wondering if you can help me get my head round the code for a calculated member that is a percentage of a fixed level within my dimension.
What i would like to be able to do is work out the %age of the current level vs that of level 1 for it, but only if it has gone past level 1 (not the [all] level).
below is what i think the code should be and i have filled in the gaps i dont know with code ideas i have made up.
IIF(
[Products].CurrentMember.Level.Ordinal > 1
,
([products].CurrentMember,[Measures].[Value])/
([products].CurrentMember.CurrentSubCat,[Measures].[Value]),
Null
)
following is a quick layout of my cube.
Dimension: | Measure:
Products | Measures
. Sub Cat | . Measures Level
.. Supplier | Units
... Brand | Value
.... Description |
Example Dimension Products:
. Cigs
.. adam
... 1
.... box of 10 adams![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
.. bill
... 1
.... box of bills
. Cigar
.. adam
... 1
.... single adam
. Conf
.. bill
... 1
.... chocolate bills
Many Many Thanks in advance!
Regards,
![[pc3] [pc3] [pc3]](/data/assets/smilies/pc3.gif)
Adam![[glasses] [glasses] [glasses]](/data/assets/smilies/glasses.gif)
Wondering if you can help me get my head round the code for a calculated member that is a percentage of a fixed level within my dimension.
What i would like to be able to do is work out the %age of the current level vs that of level 1 for it, but only if it has gone past level 1 (not the [all] level).
below is what i think the code should be and i have filled in the gaps i dont know with code ideas i have made up.
IIF(
[Products].CurrentMember.Level.Ordinal > 1
,
([products].CurrentMember,[Measures].[Value])/
([products].CurrentMember.CurrentSubCat,[Measures].[Value]),
Null
)
following is a quick layout of my cube.
Dimension: | Measure:
Products | Measures
. Sub Cat | . Measures Level
.. Supplier | Units
... Brand | Value
.... Description |
Example Dimension Products:
. Cigs
.. adam
... 1
.... box of 10 adams
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
.. bill
... 1
.... box of bills
. Cigar
.. adam
... 1
.... single adam
. Conf
.. bill
... 1
.... chocolate bills
Many Many Thanks in advance!
Regards,
![[pc3] [pc3] [pc3]](/data/assets/smilies/pc3.gif)
Adam
![[glasses] [glasses] [glasses]](/data/assets/smilies/glasses.gif)