Technical data

Chapter 11 Using Built-in Functions in Analytic M odels
See Also
Chapter 11, “U sing Built-in Functions in An alytic Models,” IF, page 164 and Chapter 11, “Using Built-in
Functions i n Analytic Models,” NUMMEMBERS, page 177.
MID
Syntax
MID(Text, Start, {Count})
Description
The MID functi
on returns Count characters from text, beginning with Start.IfCount is omitted, returns all
characters to
the end of text.
Example
MID("StringFun", 6, 3) returns Fun.
MIN
Syntax
MIN(X, Y)
MIN(arg1, arg2,. . . arg16)
Description
The MIN funct
ion returns the minimum of a series of values. It accepts up to 16 arguments.
Example
GivenA=4,B=3,C=2,D=1
MIN(A, B, C, D) returns D.
You can somet
imes simplify formulas by using the MIN function instead of the IF function. For example,
suppose that
an analytic model conta ins data cubes called CASH_NEEDED, CREDIT_BALANCE, and
MAX_CREDIT.
You might be tempted to calculate the CREDIT_DRAW by using the following formula:
IF(CASH_NEE
DED <= MAX_CREDIT - CREDIT_BALANCE, CASH_NEEDED, MAX_CREDIT - CREDIT_
BALANCE)
In other word
s, if CASH_NEEDED is less than or equal to the available credit, draw the full CASH_NEEDED;
otherwise, d
raw the available credit. Although the IF function does the job, the MIN function is simpler:
MIN(CASH_NEEDED, MAX_CREDIT - CREDIT_BALANCE)
If CASH_NEED
ED is less than the available credit, the formula returns CASH_NEEDED; otherwise, the
formula retu
rns the available credit.
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,” MAX, page 170 .
Copyright © 1988-2007, Oracl e. All rights reserved. 173