Technical data

Creating Rules, Formul as, and User Functions Chapter 10
Understanding the Calculation of More Than One Member
The following f
ormula provides an example of a calculation for more than one member. The formula returns
one result for
Administration, another result for Data Processing, and a third result for all other departments:
CASE([DEPARTM
ENTS:Administration] : ADMINISTRATION_RESULT, [DEPARTMENTS:Data
Processing] : DATA_PROCESSING_RESULT, #DEFAULT : RESULT_FOR_ALL_OTHER_DEPARTMENTS)
Creating a Cal
culation for O nly One Member
To create a calculation for only one member:
1. Define a formula for the result data cube.
2. Enter IF and an opening parenthesis.
You are using the IF function to return different results, depending on a condition.
See C
hapter 11,
“Using Built-in Functions in Analytic Models,” IF, page 164.
3. Insert the memb
er reference for the exceptional member.
Note. When you use a member reference as a condition, it returns True if the analytic calculation
engine is calc ulating values for that member; otherwise, it returns False.
See Chapter 10, “Creating Rules, Formulas, and User Functions,” Inserting a Dimension Member
Reference into a Rule, page 1 29.
4. Enter a comma, and then enter the result that should be returned if the exceptional member is being
calculated.
5. Enter another comma, and then enter the result that should be returned if one of the nonexceptional
members is being calculated.
6. Enter a closing parenthesis.
Note. To perform the same calculation for several members, combine two or more member
references with .OR. operators. For example: [DEPARTMENTS:Administration] .OR.
[DEPARTMENTS:Data Processing].
Creating a Calculation for More Than One Member
To create a calculation for more than one member:
1. Define a formu
la for the result data cube.
2. Enter CASE and
an opening parenthesis.
Youareusingt
he CASE function to evaluate a Condition:Result pair for each special case.
See C
hapter 11, “Using Built-in Functions in Analytic M odels,” CASE, page 144.
3. Enter a Condition:Result pair for each special calculation:
a.
Insert a member reference for one of the members in the dimension.
For example:[
DEPARTMENTS:Administration]
This condition tests whether results are being calculated for the specified m em ber.
b. Enter a colon to separate the condition from the result.
c. Enter t he appr
opriate result for the specified member.
132 Copyright © 1988-2007, Oracl e. All rights reserved.