![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I currently have a problem with my MDX expression that I can't figure out. Here's the information: MDX Expression: IIF(IsEmpty(([Measures].[Expended Dollars],Ancestor([Business Group].Currentmember,1))),1,[Measures].[Expended Dollars]/([Measures].[Expended Dollars],Ancestor([Business Group].Currentmember,1))) I'm displaying the percentage of expended dollars relative to the total for the group. When I place other dimensions to the left of the Business Group dimension in Excel the percentages do display correctly for any grouping that has a grand total value for the grouping. An example is the following: GENERAL OPERATIONS Dummy Value1 $91,121.55 1.78% Dummy Value2 $286.00 0.01% Dummy Value3 $397.21 0.01% Dummy Value4 Dummy Value5 $5,020,816.91 98.20% GENERAL OPERATIONS Total $5,112,621.67 100.00% The problem occurs when there is no expended values at all for a grouping as in the following example: TRAINING Dummy Value1 100.00% Dummy Value2 100.00% Dummy Value3 100.00% Dummy Value4 100.00% Dummy Value5 100.00% TRAINING Total 100.00% I want my MDX to be able to display this situation correctly as it does for groupings that have expenditures (note in the top example that the Dummy Value 4 line is blank for both since it did not have an expenditure. My question. How can I modify my MDX to test for a null or non-existent grand total so it will not incorrectly display 100% for every item in the grouping? Thanks so much! This is my first project with MDX so it may be an easy answer and I appreciate your patience!! Martin |
#3
| |||
| |||
|
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |