fbpx

Ancestor (MDX)

Returns the ancestor (i.e., parent) of a specified member at a specified level or distance.

Parameters

Name Type Cardinality Default value
  member-expression  one   
level/distance  level-numeric-expression  one   

Return

member

Description

Either a level expression or a numeric expression can be specified as parameter for this function.

1) The level is specified.

Returns the ancestor of a specified member at the specified level.
Note that if the specified level is the level of the specified member, then the member itself is returned.
Note that if the specified member has no ancestor at the specified level, a NULL value is returned.

2) The distance (i.e., a numerical expression) is specified.

If the specified distance is 0, then the member itself is returned.
If the specified distance is 1, then the member's parent itself is returned.
If the specified distance is 2, then the member's grandparent itself is returned.

See Also

Ancestors Ascendants IsAncestor

Examples

Special Examples (errors, null, ...)

XMLA Properties

Find here the value of the XMLA properties when not specified otherwise.