DeepSee MDX Reference
PARALLELPERIOD
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Given a reference member, a parent level of that member, and an integer, this function counts backward in the parent level, finds a previous member in that level, and then returns its child that has the same position as the reference member.
Returned Type
This function returns a member.
Syntax and Details
PARALLELPERIOD(level_expression,offset,member_expression) 
Where:
For the given member, this function examines the ancestor within the given level, counts backward from that member (using offset), finds another member in that level, and returns the child member that has the same position as the reference member.
This function ignores the hierarchy; that is, two members can be considered adjacent even if they have different parents.
Example
For example, the following query finds the quarter that is parallel to Q1 1943, by looking back one year:
SELECT MEASURES.[%COUNT] ON 0, PARALLELPERIOD(birthd.year,1,birthd.[Q1 1943]) ON 1 FROM patients
 
                             Patient Count
Q1 1942                                  22
In contrast, the following query finds the quarter that is parallel to Q1 1943, by looking one decade backward:
SELECT MEASURES.[%COUNT] ON 0, PARALLELPERIOD(birthd.decade,1,birthd.[Q1 1943]) ON 1 FROM patients
 
                             Patient Count
Q1 1939                                  17
As noted previously, you can specify a negative integer for offset. The following query finds the quarter that is parallel to Q1 1943, by looking ahead three years:
SELECT MEASURES.[%COUNT] ON 0, PARALLELPERIOD(birthd.year,-3,birthd.[Q1 1943]) ON 1 FROM patients
 
                             Patient Count
Q1 1946                                  18
See Also