FirstElement (PQL)

Returns the first member from a given list.

  • Returned Output: Member
  • Library: PQL \ Semantic \ Member
  • Version: 2018.00.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

FirstElement( <List> )

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

Comments
  • List parameter should be a list or set of elements from an existing hierarchy in the model.
  • For details on how to employ and use this function see the semantic calculation overview.
Different Function types
  • This function is similar to the MDX FirstSibling function.
  • The reciprocal LastElement function operates similarly.
  • Unlike the Head function, the FistElement function returns a member, rather than a list.

Examples

This example returns the member Alabama in the state hierarchy (assuming we're only using US states):

FirstElement( AllMembers([Customer].[state]) )