Below is the MDX which will calculate market share at runtime/dynamically. It always reads data from the parent axis.
iif
(
Axis(1)(0)(Axis(1)(0).Count – 1).Dimension.CurrentMember.Parent is null,
null,
(
[measures].[x]
/
(
[measures].[x],Axis(1)(0)(Axis(1)(0).Count -1).Dimension.CurrentMember.Parent
)
)
* 100
)
Very nice but I have other problem.
How I can show the Grand Total with sum of Market Share?
Did u try writing a SCOPE for ‘ALL’ member of your parent dimension. You can sum over the Market Share calculated measure inside that SCOPE.