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
* Click on the function's arguments above for more details on the input values.
- 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.
This example returns the ancestor member "Canada" for the county of "Newton".
Ancestor([Customer].^[Geo Location].[Canada].[British Columbia].[Newton], [Customer].^[Geo Location].^[Country])