Technical data
Chapter 11 Using Built-in Functions in Analytic M odels
The initial values in the cash flow should be negative to represent a c ash outflow. The remaining values may
be all positive (representing cash inflows), or a combination of positive and negative values.
Example
You can create
a data cube called NET_PRESENT_VALUE and calculate the net present value for a data cube
called CASH_F
LOW with the following formula:
NPV(MONTHS, A
NNUAL_RATE / 12, CASH_FLOW)
You can calculate the net present value for the first 12 months with the following formula:
NPV(MONTHS, A
NNUAL_RATE / 12, CASH_FLOW, 0, MEMBER(MONTHS) <= 12)
The Condition ensures that the NPV function uses only those v alues for which the month index is 12 or less.
See Also
Chapter 11, “Using Built-in Functions in Analytic Models,” MEMBER, page 172
NUM2TEXT
Syntax
NUM2TEXT(Number, {Decimal Places})
Description
The NUM2TEXT f
unction c onverts Number to Text. Decimal Places specifies the number of decimal places
that are used t
o convert the number to text.
Example
NUM2TEXT(SALESPRICE, 3) for SALESPRICE’s value of 10.23457 as the string 10.234.
NUMMEMBERS
Syntax
NUMMEMBERS(Dimension)
Description
The NUMMEMBERS function returns the number of members in Dimension.
Returns
Returns the n
umber of members in Dimension.
Example
If a d imension called PRODUCTS contains eight members; NUMMEMBERS(Products) returns 8.
OPRID
Syntax
OPRID()
Copyright © 1988-2007, Oracl e. All rights reserved. 177