Level

Returns the level of the specified member in a regular hierarchy.

  • Returned Output: Level
  • Library: PQL \ Semantic \ Hierarchical
  • Version: 2020.10.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

Level( <Member> )

Syntax Alternatives

<Member> .Level()

* 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 hierarchy in the model.
  • 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 level function.

DEPRECATION

The old version of the "level" function returned all members in a given level. This method is now deprecated, and users should instead use the AllMember function on the level. Any existing logic with the old formulation will still continue to work.

Examples

This example returns the "States" level from the Geography hierarchy, since it is the level that contains "NY".

Level([Customer].^[Geography].^[States].[NY])

This example returns the "Months" level from the Date hierarchy, since it is the level that contains "Jan 2020".

([Date].^[YMD].^[Months].[JAN2020]).Level