Technical data

Using Built-in Functio ns in Analytic Models Chapter 11
Example
Suppose that yo
u would like to update your sales forecast on a monthly basis, but you also would like to save
the original f
orecast. If the current forecast is stored in a data cube called SALES_FORECAST,youcan
calculate the
ORIGINAL_SALES_FORECAST cube as follows:
IF(UPDATE_OR
IGINAL, SALES_FORECAST, SELF( ))
(See the entry for the IF built-in function if you are unfamiliar with this function.) UPDATE_ORIGINAL is a
single value data cube that contains either a true or false value. If UPDATE_ORIGINAL is false, the SELF
function returns the current value of ORIGINAL_SALES_FORECAST, thereby leaving the original forecast
unchanged. If UPDATE_ORIGINAL is true, the IF function returns the value of SALES_FORECAST,
thereby updating the original forecast.
See Also
Chapter 11, “Using Built-in Functions in Analytic Models,” IF, page 164
SET
Syntax
SET(Variable, Expression)
Note. The second argument of the SET function can be any valid expression.
Description
The SET function sets a value to a variable.
Example
The following formula sets the &Index variable to 1.
SET(&Index, 1)
SIN
Syntax
SIN(Data)
Description
The SIN funct
ion returns the sine of Data,whereData represents an angle in radians.
To convert from degrees to radians, multiply by PI( ) / 180. (The PI function returns the value of PI.)
Returns
The sine of Data,whereData represents an angle in radians.
Example
The followin
g examples employ the SIN built-in function:
SIN(PI()/6)returns 0.5 (sine of PI / 6 radians).
188 Copyright © 1988-2007, Oracl e. All rights reserved.