This function returns a member.
Syntax and Details
ancestor_level is an expression that returns a level. For example:
This level must be the parent level of member_expression or an ancestor of that member.
member_expression is an expression that returns a member.
This expression cannot refer to a measure.
Given a level and a member, this function returns the first member that is a descendent of the given level and that is at the same level as member.
The following query displays the opening quarter for the year that includes Q3 2003:
SELECT MEASURES.[%COUNT] ON 0, OPENINGPERIOD(birthd.year,birthd.[Q3 2003]) ON 1 FROM patients Patient Count Q1 2003 35
In contrast, the following query displays the opening quarter for the decade that includes Q3 2003:
SELECT MEASURES.[%COUNT] ON 0, OPENINGPERIOD(birthd.decade,birthd.[Q3 2003]) ON 1 FROM patients Patient Count Q1 2000 33