0
votes

I have an MDX query which drills into a hierarchy - I need the count of a dimension for each level. I have tried a count function but it doesnt seem to work against each level:

 member [RefIDCount] as distinctCount([Incident Details].[Process Safety Classification].&[Tier 1])

 select 
 {
    [RefIDCount]
} on columns, 
{
 DESCENDANTS(
    [Reporting Hierarchies].[Hierarchy].[Reporting Category].&[49]
 --  #RepCat#
)
} on rows
FROM [Monthly Stats]

This gives me the same count for each level :

MDX Results

What am I doing wrong? How do I get the count to be per level?

1

1 Answers

0
votes

Take a look at the example below

with member measures.t
as 
[Product].[Product Categories].currentmember.level.members.count
select 
{[Measures].[Internet Sales Amount],measures.t}
on 0,
descendants([Product].[Product Categories].members
)
on 1 
from 
[Adventure Works]

Result

enter image description here