Technical data
Chapter 11 Using Built-in Functions in Analytic M odels
Description
The FV function
returns the Future Value of an investment with a present v alue of PV,wherePmt is invested
for NPer perio
ds at Rate per period. If Type is omitted or zero, FV assumes the investment is an ordinary
annuity. If Ty
pe is nonzero, FV assumes the investment is an annuity due.
Note. Enter negative amounts for money out of your pocket, or positive amounts for money coming to you.
Example
Suppose that you deposit USD 1,000 at the end of each year in a savings account that earns 6 percent per year.
To determine the value of the account after 8 years, use the following formula:
FV(0.06, 8, -1000, 0) = 9897
If you deposit
the USD 1,000 at the start of each year, use the following formula for the VALUE_OF_ACCT
data cube. The
1 for the Type argument indicates an annuity due:
FV(0.06, 8, -1000, 0, 1) = 10491
If the account
already has USD 3,000 in it at the start of the 8 years, use the following formula:
FV(0.06, 8, -1000, -3000, 1) = 15273
GROUPAVG
Syntax
GROUPAVG(Dimension to Group, Expression, Association 1, {Association 2 ...})
Description
Use the GROUPA
VG function to a verage information by group. Expression contains the data to sum. The
Assocation(s
) indicate for which group(s) to average.
Example
Suppose that you want to average employee salaries by department. Create an analytic model definition
that contains the following data cubes:
1. EMPLOYEE_SALARY, which uses a dimension called EMPLOYEES.
This data cube contai ns the sa lary for each employee.
2. AVERAGE_DEPARTMENT_SALARY, which uses a dimension called DEPARTMENTS.
This data cube contains the average salaries for each department.
3. An association data cube called EMPLOYEE_DEPT by performing the following:
• Create the EMPLOYEE_DEPT data cube.
• Format the EMPLOYEE_DEPT data cube as a member of the DEPARTMENTS dimension.
• Attach the EMPLOYEES dimension to the EMPLOYEE_DEPT data cube.
Calculate Dep
artment Salary with the following formula:
GROUPAVG(EMP
LOYEES, EMPLOYEE_SALARY, EMPLOYEE_DEPT)
You can read this formula as follows: Average the employees’ salaries by department.
Copyright © 1988-2007, Oracl e. All rights reserved. 159