Returns the member that is currently being calculated in the specified dimension (dimName). This function can be used as a parameter of another function, where that parameter is a single member or a list of members.
@CURRMBR (dimName)
dimName | A single dimension name. |
In the Sample Basic database,
@CURRMBR(Year);
returns Jan if the current member of Year being calculated is Jan.
As a more complex example, consider the following formula in the context of the Sample Basic database. Assume that the Measures dimension contains an additional member, Average Sales.
"Average Sales" (IF(@ISLEV(Product,0)) Sales; ELSE @AVGRANGE(SKIPNONE,Sales,@CHILDREN(@CURRMBR(Product))); ENDIF;);
This formula populates each upper-level member of the Product dimension (100, 200) at Average Sales. To calculate Average Sales, the Sales values for the level 0 members of Product are averaged and placed in their respective parent members. The Average Sales values for the level 0 Product members are the same as the Sales values, as specified by the IF statement in the calculation script.
This example produces the following report:
Jan New York Actual Sales Average Sales ===== ============= 100-10 5 5 100-20 10 10 100-30 15 15 100 30 10 200-10 20 20 200-20 25 25 200-30 30 30 200-40 35 35 200 110 27.5 300 #MI #MI 400 #MI #MI Diet 35 11.67 Product 140 35
©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |