![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings, I'm very new to MDX, so please bear with me.. Basicly I need a calculated member. I have many different dimensions, and all of them are being used (for filtering, not on rows/columns). On rows I have dimension Variant (which can be 'I', 'II', etc). Now, what I need is %age of that Variant of all the Variants. Eg, leaving all the filtering by other dimensions, i need a member which would show how many % is Variant 'I' of all Variants.. How can that be done? |
#3
| |||
| |||
|
|
Algirdas wrote: Greetings, I'm very new to MDX, so please bear with me.. Basicly I need a calculated member. I have many different dimensions, and all of them are being used (for filtering, not on rows/columns). On rows I have dimension Variant (which can be 'I', 'II', etc). Now, what I need is %age of that Variant of all the Variants. Eg, leaving all the filtering by other dimensions, i need a member which would show how many % is Variant 'I' of all Variants.. How can that be done? Suppose you have a measure value and a level named variantLevel in the variant dimension. MDX WITH MEMBER [Measures].[Variant Percentage] AS '( [Variant].CurrentMember, [Measures].[Value] ) / Sum( [Variant].[VariantLevel].Members, [Measures].[Value] )', FORMAT_STRING = 'Percent' SELECT {[Variant].[VariantLevel].Members} ON ROWS, {[Measures].[Variant Percentage]} ON COLUMNS FROM CubeName /MDX Hope this helps, Hans. |
#4
| |||
| |||
|
|
if you have a all member in variant dimension, then your calculated member should be: [variant].currentmember/[variant].[all] |
#5
| |||
| |||
|
|
Out of sheer curiosity - how would that look if i'd needed to get percentage of ALL Variants, and say ALL Dates (or any other dimension), eg combine two full dimensions (while leaving all other filters) to produce the percentage? |
#6
| |||
| |||
|
|
([Variant].CurrentMember,[Dates].CurrentMember, [Measures].[Value]) / ([Variant].[All Variant], [Dates].[All Dates], [Measures].[Value]) |
#7
| |||
| |||
|
|
([Variant].CurrentMember,[Dates].CurrentMember, [Measures].[Value]) / ([Variant].[All Variant], [Dates].[All Dates], [Measures].[Value]) When trying that, I get "cannot find member" when trying [All ...], and when I replace that with .AllMembers, I get unexpected token at ",".. what am I doing wrong? |
![]() |
| Thread Tools | |
| Display Modes | |
| |