Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
SQL Server 2008 Books Online (October 2009)
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]
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker