MDX: How To Aggregate Hierarchy Level Members With Same Name

Posted by Dave Frautnick on Stack Overflow See other posts from Stack Overflow or by Dave Frautnick
Published on 2010-03-16T22:21:39Z Indexed on 2010/03/17 13:41 UTC
Read the original article Hit count: 265

Filed under:

Greetings,

I am new to MDX, and am having trouble understanding how to perform an aggregation on a hierarchy level with members that have the same names. This query is particular to Microsoft Analysis Services 2000 cubes.

I have a given hierarchy dimension with levels defined as follows:

[Segment].[Flow].[Segment Week]

Within the [Segment Week] level, I have the following members:

[Week- 1]
[Week- 2]
[Week- 3]
   ...
[Week- 1]
[Week- 2]
[Week- 3]

The members have the same names, but are aligned with a different [Flow] in the parent level. So, the first occurrence of the [Week- 1] member aligns with [Flow].[A] while the second occurrence of [Week- 1] aligns with [Flow].[B]. What I am trying to do is aggregate all the members within the [Segment Week] level that have the same name. In SQL terms, I want to GROUP BY the member names within the [Segment Week] level. I am unsure how to do this. Thank you.

Dave

© Stack Overflow or respective owner

Related posts about mdx