Ancestor (PQL)
Returns an ancestor element of the specified member in a 'regular' hierarchy.
- Returned Output: List
- Library: PQL \ Semantic \ Hierarchical
- Version: 2020.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
Ancestor( <Member> )
* Click on the function's arguments above for more details on the input values.
Comments
- The member needs to be the unique name of an existing member in a regular hierarchy.
- The level needs to be the unique name of an existing level in a regular hierarchy.
- The function will not work on drill-path hierarchies.
- For details on how to employ and use this function see the semantic calculation overview.
Different Function types
- This function is like the MDX ancestor function.
Examples
This example returns the ancestor member "Canada" for the county of "Newton".
Ancestor([Customer].^[Geo Location].[Canada].[British Columbia].[Newton], [Customer].^[Geo Location].^[Country])