I have 1 dimension Data with 2 hierarchies: Gregorian Calendar, Planning Calendar. [Gregorian Year] - [Gregorian Month] - [Gregorian Day] [Planning Year] - [Planning Month] - [Planning Day] I have 2 MDX measures:
[Planning Stock] = Sum(PeriodsToDate([Data].[Planning Calendar].[(All)]), [amount])
[Gregorian Stock] = Sum(PeriodsToDate([Data].[Gregorian Calendar].[(All)]), [amount])
How to create one measure that will recognize the hierarchy? I wrote something like that, but it does not work :(
iif(([Data].currentmember.level is [Data].[Planning Calendar].[(All)]),
(Sum(PeriodsToDate([Data].[Planning Calendar].[(All)]), [amount])),
(Sum(PeriodsToDate([Data].[Gregorian Calendar].[(All)]), [amount]))
)
Do you have any ideas?