Share via


Descendants (PEL)

This function returns the set of descendants of a member at a specified level or distance, optionally including or excluding descendants in other levels.

// Member expression syntax using a level expression
Member_Expression.Descendants(
      [ , Level_Expression [ , Argument_Descendants ] ]
      ) 

// Member expression syntax using a numeric expression
Member_Expression.Descendants(
      , Distance [ , Argument_Descendants] ]
      ) 

Parameters

  • Member_Expression
    A valid PerformancePoint Expression Language (PEL) expression that returns a member.
  • Level_Expression
    A valid PEL expression that returns a level.
  • Distance
    A valid integer expression that specifies the distance from the specified member.
  • Argument_Descendants
    A valid Argument_Descendants expression specifying a description flag that distinguishes among possible sets of descendants.

    For specific information about values for this flag, see Remarks.

Return values

This function returns the descendants of a member, subject to specified arguments. For information about return values that are expected with specific values of Argument_Descendants, see the Remarks of this topic.

Note

The specified member is considered a descendant of itself.

The following list provides additional information about expected return values:

  • If Distance is specified and an Argument_Descendants flag is not specified, the Descendants function is defined as:

    Member_Expression.Descendants( Distance, SELF)
    
  • If no level expression, distance, or flags are specified, the Descendants function is defined as:

    Member_Expression.Descendants(0, SELF_AND_AFTER)
    
  • If a level is specified and an Argument_Descendants flag is not specified, the Descendants function is defined as:

    Member_Expression.Descendants(Level_Expression, SELF)
    
  • You can write a Descendants function to return leaves, such as:

    Member_Expression.Descendants(999, LEAVES)

    However, it is not possible to use the Descendants function to return all values other than leaves.

Remarks

By changing the value of the description flag Argument_Descendants, you can include or exclude the following characteristics:

  • Descendants before, at, or after the specified level or distance (until the leaf node)

  • Leaf children, regardless of the specified level or distance

The following table provides specific descriptions of the values that are available for the Argument_Descendants flag.

  • AFTER
    Returns descendant members from all levels subordinate to the specified level or distance
  • BEFORE
    Returns descendant members from all levels superior to the specified level or distance
  • BEFORE_AND_AFTER
    Returns descendant members from all levels superior to or subordinate to the specified level or distance
  • LEAVES
    Returns leaf descendant members at the specified level or distance, or superior to the specified level or distance
  • SELF
    Returns descendant members from the specified level or distance
  • SELF_AND_AFTER
    Returns descendant members from the specified level or distance, or subordinate to the specified level or distance
  • SELF_AND_BEFORE
    Returns descendant members from the specified level or distance, or superior to the specified level or distance
  • SELF_BEFORE_AFTER
    Returns all descendant members

The value of Argument_Descendants is a specific PEL type, ArgumentDescendants. For more information, see the topic Types (PEL).

When the Descendants function has an integer argument, the PEL compiler can generate SQL code for this function when the function is part of an absolute reference. The compiler cannot generate SQL code when the function is part of a relative reference.

If the Descendants function call is equivalent to Children (member.Descendants(1, SELF)), the PEL compiler can always generate SQL code.

PEL cannot be used to reference user-created member views in non-time dimensions. To write a business rule that references a member view in a non-time dimension, use a native Multidimensional Expressions (MDX) implementation.

See Also

Reference

Generate (PEL)
Level (PEL)

Other Resources

PEL reference
Multidimensional Expressions (MDX) Reference on MSDN