Technical data

Chapter 11 Using Built-in Functions in Analytic M odels
MAX(A, B, C, D) returns A.
You can sometim
es simplify formulas by using the MAX function instead of the IF function. For example,
suppose an ana
lytic model contains data cubes called CASH_BALANCE and CASH_MINIMUM. You might
be tempted to c
alculate the CASH_NEEDED cube by using the following formula:
IF(CASH_BALA
NCE < CASH_MINIMUM,CASH_MINIMUM - CASH_BALANCE, 0)
In other words, if CASH_BALANCE is less than CASH_MINIMUM, return the amount required to attain the
minimum cash level; otherwise, return zero. Although the IF function does the job, it is simpler to use the
MAX function:
MAX(CASH_MIN
IMUM - CASH_BALANCE, 0)
If CASH_BALANCE is greater than CASH_MINIMUM, the first argument is negative, so the formula returns
zero for CASH_NEEDED. If CASH_BALANCE is less than CASH_MINIMUM, the first argument is
positive, so the formula returns the amount required to attain the minimum cash level.
See Also
Chapter 11, “U sing Built-in Functions in An alytic Models,” IF, page 164 and Chapter 11, “Using Built-in
Functions in Analytic Models,” MIN, page 173.
MBR2TEXT
Syntax
MBR2TEXT(Dimension, {Member})
Description
The MBR2TEXT
function converts a member to text by returning its name. The Member argument can be an
association
data cube, a member reference, a member index, or a function or expression that returns a member.
If Member is
omitted, the function returns the name of the current member in Dimension. In other words, it is
equivalent
to MBR2TEXT(DIMENSION, MEMBER(DIMENSION)).
Example
MBR2TEXT(MONTH) returns January.
MEDIAN
Syntax
MEDIAN(Dimension, Val u e s , {Condition})
Description
The MEDIAN function returns the median of Values. If Condition is omitted, the function uses all Values.If
Condition is included, the function uses only those Va l u e s for which Condition is true.
Returns
The median o
fValues. IfCondition is omitted, the function uses all Va l u e s .IfCondition is included, the
function u
ses only those Values for which Condition is true.
Copyright © 1988-2007, Oracl e. All rights reserved. 171