Offset (PQL)

Returns a member offset forwards from the specified member in a given hierarchy or attribute.

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


Offset( <Member> , <Integer> )


Offset( <Hierarchy> , <Integer> )

Syntax Alternatives

<Member> .Offset()

* 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 hierarchy in the model in the first formulation.
  • The hierarchy or attribute needs to the unique name for an existing hierarchy in the model in the second formulation. When the second formulation is used (using the hierarchy and not the member), the CURRENT MEMBER of the specified hierarchy is used as the selection.
  • The integer position offset can be a positive or negative integer
  • For details on how to employ and use this function see the semantic calculation overview.
Different Function types
  • This function is like the MDX lead function and is a specific variation of the PQL Lead function.

Also see the Lag function.


This example returns the member "2018" from the year hierarchy in the dates dimension (or table) since it is offset 2 positions after the year 2016:

Offset( [dates].[year].[2016] 2 )

This example returns the member May in the month hierarchy because it is offset 1 position from the month of June. It is reflected backwards because it is NEGATIVE 1 position from June:

Offset( [dates].[month].[June] -1 )