Ordinal (PQL)

Returns the position in a regular hierarchy for the specificed level.

Syntax

Ordinal( <Level> )

Syntax Alternatives

<Level> .Ordinal()

* Click on the function's arguments above for more details on the input values.

Comments
  • 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 ordinal function.

Examples

This example returns "3", since City is the 3rd level in the Geo Location hierarchy after country and state.

Ordinal([Customer].^[Geo Location].^[City])

This example returns "2", since State is the 2nd level in the Geo Location hierarchy after country.

[Customer].^[Geo Location].^[State].Ordinal()