cancel
Showing results for 
Search instead for 
Did you mean: 

How to return a leaf member in mdx with IDT

florencialimongi
Participant
0 Kudos

Hi, we need to create a measure with a mdx sentence that returns the leafs members of a hierarchy.

what MDX function could we use to achieve this?

we are working with 4.0 sp 4 Fx3 and SQL Analysis Services 2008 R2.

Note: The hierarchy doesn't have a unique amount of levels, for example:

ALL     --> level 1.a (leaf)

           ---> level 1.b ---> leaf 

          ---> level 1.c ---> Level 2.a --> leaf

regards,

Florencia.-

Accepted Solutions (1)

Accepted Solutions (1)

marc_daniau
Advisor
Advisor
0 Kudos

One can extract the leaf members of a parent child hierarchy by asking the descendants of the root member with the following expression:
Descendants([Organization].[Organizations].&[1], , LEAVES)

The leaf members can be defined in the business layer using a Named Set. That named set can then be invoked from a measure expression like:
Count(@Select(Organization\Leaf Org))

Answers (0)