MEMBER
Syntax
MEMBER (Dimension)
Description
The MEMBER function returns the Member being calculated.
Returns
The member being calculated.
Example
The following examples employ the MEMBER function:
Example 1
You can perform different calculations for different ranges of members by comparing the MEMBER function to a number. For example, to perform a special calculation for the first six months, use the MEMBER function with the IF function:
IF(MEMBER(MONTHS) <= 6, EXPR_FOR_1ST_6_MONTHS, EXPR_FOR_OTHER_MONTHS)
Example 2
You can perform special calculations for a particular member in a dimension by comparing the MEMBER function to a member reference. For example, suppose that your company allocates the Administration department's expense equally to all of the other departments. Your analytic model contains a DEPARTMENTS dimension, of which Admin is a member. Your analytic model also contains a data cube, TOTAL_EXPENSE, that contains the total expense for each department. The following formula describes how you would calculate the administration allocation for each department in a data cube called ADMIN_ALLOCATION:
IF(MEMBER(DEPARTMENTS) = [DEPARTMENTS:Admin], -TOTAL_EXPENSE,
TOTAL_EXPENSE [DEPARTMENTS:Admin] / (NUMMEMBERS(DEPARTMENTS) - 1))
The NUMMEMBERS function returns the number of members in a dimension. The key to this formula is that the allocation for each department is the same except for Admin. The IF function checks which department is being calculated. If the department is Admin, the result is minus Total Expense so that it backs out the expense for the Admin department. If the department is not Admin, the result is Total Expense for Admin—notice the data cube slice—divided by the number of departments other than Admin.
Related Topics