Export (0) Print
Expand All
Expand Minimize
2 out of 4 rated this helpful - Rate this topic

ParallelPeriod (MDX)

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


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

A valid Multidimensional Expressions (MDX) expression that returns a level.

Index

A valid numeric expression that specifies the number of parallel periods to lag.

Member_Expression

A valid Multidimensional Expressions (MDX) expression that returns a member.

Although similar to the Cousin function, the ParallelPeriod function is more closely related to time series. The ParallelPeriod function takes the ancestor of the specified member at the specified level, finds the ancestor's sibling with the specified lag, and finally returns the parallel period of the specified member among the descendants of the sibling.

The ParallelPeriod function has the following defaults:

  • If neither a level expression nor a member expression is specified, the default member value is the current member of the dimension with a type of time (Time.CurrentMember).

  • If a level expression is specified, but a member expression is not specified, the default member value is Level_Expression.Hierarchy.CurrentMember.

  • The default index value is 1.

  • The default level is the level of the parent of the specified member.

The ParallelPeriod function is equivalent to the following MDX statement:

Cousin(Member_Expression, Lag(Ancestor(Member_Expression, Level_Expression), Numeric_Expression)

Example

The following example returns the parallel period for the month of October 2003 with a lag of three periods, based on the quarter level, which returns the month of January, 2003.

SELECT ParallelPeriod ([Date].[Calendar].[Calendar Quarter]
   , 3
   , [Date].[Calendar].[Month].[October 2003])
   ON 0
   FROM [Adventure Works]

The following example returns the parallel period for the month of October 2003 with a lag of three periods, based on the semester level, which returns the month of April, 2002.

SELECT ParallelPeriod ([Date].[Calendar].[Calendar Semester]
   , 3
   , [Date].[Calendar].[Month].[October 2003])
   ON 0
   FROM [Adventure Works]
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.