Technical data

Using Built-in Functio ns in Analytic Models Chapter 11
See Also
Chapter 9, “Creating Hierarchies,” Pushed Down Data, page 80
PCT
Syntax
PCT(Dimension, Data, {Count})
Description
The PCT functio
n returns the percentage change between the value of Data for the Member being calculated
and the value o
f Data for Count members back. If Count is omitted, it is assumed to be 1.
Returns
The percentage change between the value of Data for the Member being calculated and the value of Data
for Count members back. If Count is omitted, it is assumed to be 1.
Example
Suppose that you wish to calculate the monthly and yearly percentage change in a data cube called SALES. If
SALES uses a dimension called M ONTHS, use the following formula:
PCT(MONTHS, SALES)
Because the Co
unt argument is omitted, the program assumes it to be 1. Thus, the program calculates
the percenta
ge change in sales from the previous month to the month being calculated. Calculate the
YEARLY_PERC
ENT_CHANGE cube by using 12 for the third argument:
PCT(MONTHS, SALES, 12)
This formula
calculates the percentage change in SALES from 12 months ago to the month being calculated.
PERCENTILE
Syntax
PERCENTILE(
Dimension, Va l u e s , Percentile, {Type}, {Condition})
Description
The PERCENTILE function returns a percentile of Va l u e s .ThePercentile argument sets which percentile
is calculated. If Type is zero or omitted, PERCENTILE calculates a population percentile; otherwise,
PERCENTILE calculates a sample percentile. If Condition is omitted, the function uses all Va l u e s.If
Condition is included, the function uses only those Values for whichCondition is true.
Example
Suppose that an analytic model contains a data cube called SCORES that uses dimensions called STUDENTS
and TESTS.
The followi
ng formula calculates the 90th percentile of the scores for each test:
PERCENTILE
(STUDENTS, SCORES, 90%)
The following formula calculates the 50th percentile of the first 10 students:
PERCENTILE
(STUDENTS, SCORES, 50%, MEMBER(STUDENTS) <= 10)
180 Copyright © 1988-2007, Oracl e. All rights reserved.