Author: Joyce Zhou
When assigning values to leaf members in a parent-child hierarchy, please be aware of the following scoping method.
Below is an MDX Rule within a Model. In this Rule, although the definition for the Y1 and Y2 members are different, we expect the results to be the same because the following two functions should return the same member set.
DESCENDANTS([Account].[Account].[Income Statement], 1000, LEAVES)
[Account].[Account].Properties(“ChildCount”) = “0”
However, the results we get are different. See the form below:
The difference comes from the Data Members in the parent-child hierarchy. If we were merely scoping the leaves using the DESCEDANTS MDX function, the Data Member of the parent member would be included in the result set. Here is the Data Member definition:
A Data Member is a child member associated with a parent member in a parent-child hierarchy. A Data Member contains the data value for its parent member, rather than the aggregated value for the parent’s children.
If your intention is to work with the member leaf only, you can use Kepion-generated attribute ChildCount. Please refer to the syntax in the MDX Rule example above.