Technical data

Using Built-in Functio ns in Analytic Models Chapter 11
Description
The CHR functio
n returns the equivalent ASCII character of the number argument. The number must be in
range from 0 to
255; otherwise, an invalid type error with be thrown.
Returns
The equivalent ASCII character of the number argument.
Example
For a cube formatted as text, CHR(65) returns the character A.
CONSOL
Syntax
CONSOL(Dimension, Data)
Description
The CONSOL fun
ction returns the value of Data for the total member of Dimension.
Returns
The value of Data for the total member of Dimension
Example
Suppose an analytic model contains a data cube called SALES that uses a dimension called PRODUCTS.Use
the following formula to calculate each product’s sales as a percentage of tota l sales:
SALES / CONSOL(PRODUCTS, SALES)
This formula
divides each product’s sales by the consolidated value for SALES.
COS
Syntax
COS(Data)
Description
The COS function returns the cosine 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
Example
The followin
g examples employ the COS built-in function:
COS(PI()/3)returns 0.5 (cosineofPI/3radians).
COS(PI()/2)returns 0 (cosineofPI/2radians).
COS(45 * PI( ) / 180) returns 0.7071067812 (cosine of 45 degrees).
146 Copyright © 1988-2007, Oracl e. All rights reserved.