Need help with MDX -
08-03-2006
, 02:00 PM
Hi,
As you can see, I created a calculated Measure called
[Mbr Count] = [Member Months] / Descendants ([Time].Current Member,
[Time].[Yr_Mo]) --- # of Months ----
Now i created a 'Time Set' with 2 months and defined a member 'Total' as an
Aggregate of the 2 months.
When i run the below MDX, i am getting "1.#INF" for the 'Total'. I know that
the Descendants function for 'Total' is giving 0 and hence the 1.#INF. I want
it to return 2 (for 200301 & 200302) so that i can get the calculated value
for 'Total'.
Please help with the MDX.
200301 200302 Total
---------- ----------- -----------
Mbr Count 11549106 11471022 1.#INF
with
MEMBER [Measures].[Mbr Count] as
'iif([Measures].[Member Months] <> 0,
[Measures].[Member Months] /
count(Descendants([Time].CurrentMember,[Time].[Hierarchy].[Yr_Mo])), 0)'
Set [Time set] as
'{[Time].[Hierarchy].[Yr_Mo].&[200301],
[Time].[Hierarchy].[Yr_Mo].&[200302]}'
member [Time].[Hierarchy].[Total] as 'AGGREGATE([Time set])'
select
{[Time set],[Time].[Hierarchy].[Total]}on columns,
[Measures].[Mbr Count] on rows
from [Sales Model]
Thanks,
Prasad. |