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.
Computing descendants from STATIC member references in this argument is not supported (e.g. Descendants([DateCustom].[StandardWeek].[All],…)
), except when extracting a single member from the set using the EXTRACTMEMBER
function. For example, EXTRACTMEMBER(DESCENDANTS([DateCustom].[StandardWeek].[All], ...), 0)
. Note that this example may extended to use additional set functions between EXTRACTMEMBER
and DESCENDANTS
, such as TAIL
, HEAD
, or NONEMPTY
.
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])