IsLeaf (PQL)
Returns whether a specified member is a leaf member.
- Returned Output: Boolean
- Library: PQL \ Semantic \ Hierarchical
- Version: 2023.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
IsLeaf( <Member> )
Syntax Alternatives
<Member> .IsLeaf()
* 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 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 IsLeaf function.
Examples
The IsLeaf function is used to determine whether a member in a hierarchy is a "leaf" node, meaning it has no children. In a hierarchical structure, leaf nodes are the lowest-level members that do not have any descendants.
IsLeaf([Products].^[Products].CurrentMember)
Parameters
- member: The member in the hierarchy that you want to check.
Returns
The function returns a boolean value:
- TRUE if the member is a leaf node (i.e., it has no children).
- FALSE if the member has children (i.e., it is not a leaf node).
You can see the effect from this example snippet in column #3- IsLeaf, based on the source column in position #1: