on 02-15-2013 5:58 PM
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.-
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))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.