Technical data
Using Built-in Functio ns in Analytic Models Chapter 11
CUMAVG(MONTHS, SALES, 6)
Note that for th
e first five months, the CUMAVG function cannot look back six months, because this would go
back before th
e first month in the MONTHS dimension. The program solves this problem by averaging the
sales for all m
onths up to the month being calculated. After the first five months, the function averages the
sales for the s
ix months up to the month being calculated.
CUMSUM
Syntax
CUMSUM(Dimen
sion, Data, {Count})
Description
The CUMSUM function returns the cumulative sum of Data for the last Count members of Dimension.If
Count is omitted, CUMSUM returns the cumulative sum of all members up to the member being calculated.
Returns
The cumulative sum of Data for the last Count members of Dimension.
If Count is om
itted, CUMSUM returns the cumulative sum of all members up to the member being calculated.
Example
Suppose an analytic model c ontains a data cube called PROFIT that uses a dimension called MONTHS.Use
the f ollowing formula to calculate the cumulative profit for all months up to the month being calculated:
CUMSUM(MONTHS, PROFIT)
Use the following formula to calculate the cumulative profit for the three months up to the month being
calculated:
CUMSUM(MONTHS, PROFIT, 3)
DAVG
Syntax
DAVG(Dimension, {Data}, {Condition})
Description
The DAVG function returns the average of Data for the members in Dimension where Condition is True. If
Condition is omitted, DAVG returns the average of Data for all members in Dimension.IfData is omitted,
DAVG returns the average of the data cube being calculated, for all members up to the current member in
Dimension.
Example
The followi
ng examples provide uses of the D AVG function:
148 Copyright © 1988-2007, Oracl e. All rights reserved.