Skip to main content

Descendants

Returns the set of descendants of a member at a specified level or distance. For use with an aggregate function, i.e. SUM(Descendants(...), Measure). If the specified member has no Descendants, this function returns an empty set.

Syntax

Descendants(Member_Expression , Level_Expression | Distance [ ,Desc_Flag])

Input Parameters

Member_Expression (Required)
A valid multidimensional Expressions (MDX) expression that returns a member. Note that the "Set" form of the function is not supported.

Level_Expression or Distance (Required)
Level_Expression is a valid Multidimensional Expressions (MDX) expression that returns a level. If a positive integer distance is specified it is interpreted as the distance from the specified member.

Desc_Flag (Optional)
Distinguishes among possible sets of descendants. Only the value of "SELF" is supported. If not specified the the default behavior or "SELF" is used.

Return Value

Returns a Set of Members.

Example

Sum the Distinct Customer Count Estimate ([[Measures].[customercountestimate1]) of the current member's descendants, down to the Quarter Level. If the currentMember is part of the Reporting Quarter level, include the currentMember value in the calculation ("SELF" option).

SUM(DESCENDANTS([DateCustom].[Retail445].currentMember, [DateCustom].[Retail445].[Reporting Quarter], SELF), [Measures].[customercountestimate1])