Analysis Services
Ancestor
Returns the ancestor of a member at a specified level or distance.
Syntax
Level
Ancestor(«Member», «Level»)
Returns the ancestor of «Member» from the dimension level specified in «Level».
Distance
Ancestor(«Member», «Numeric Expression»)
Returns the ancestor of «Member» that is «Numeric Expression» steps away in the hierarchy.
Example
If the Geography dimension includes levels Country, State, and City, the following functions return the following values.
Expression | Returns |
---|---|
|
|
|
|
|
|
|
|
|
|