Skip to main content
Version: Next

ParallelPeriod

Returns the member whose ancestor at the specified level is a specified number of positions from the specified member's ancestor of the same level. ParallelPeriod is typically used to navigate a time-based hierarchy. For example, if you specify the year level with an index of one for the specified member June 2019, a lag of one at the year level from 2019 is 2018. The function returns the member June 2018.

In order to use a level in a ParallelPeriod comparison, the level must be part of a time dimension, and the level must have a custom parallel period key that specifies the period over which to compare. You can create a time dimension or change an existing dimension's type to time. Add a parallel period key to a time dimension level by editing a level

Syntax

ParallelPeriod( [ Level_Expression [ ,Index [ , Member_Expression ] ] ] )

Return Value

Returns a member from the same relative position in a previous period as the specified member.

Input Parameters

Level_Expression
An MDX expression that returns a level.

Index
A numeric expression that specifies a number of member positions.

Member_Expression
An MDX expression that returns a member.

Examples

The following example calculates internet sales from last year.

(ParallelPeriod(
[Order Date Dimension].[Order Retail445].[Order Reporting_Year],
1,
[Order Date Dimension].[Order Retail445].CurrentMember),
[Measures].[salesamount1]
)