Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B1033902 


View PDF 
The IRR function computes the internal rate of return associated with a series of cash flow values. Each value of the result is calculated to be the discount rate for each period that makes the net present value of the corresponding cash flows equal to zero.
Return Value
DECIMAL
Syntax
IRR(cashflows, [timedimension])
Arguments
A numeric expression dimensioned by timedimension, that specifies the series of cash flow values.
A name that specifies the time dimension. When cashflows has a dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR, the timedimension argument is optional. IRR automatically uses the DAY, WEEK, MONTH, QUARTER, or YEAR dimension of cashflows when you do not specify a value for timedimension.
Notes
The result returned by the IRR function is dimensioned by all the dimensions of cashflows except its time dimension. When cashflows is dimensioned only by the time dimension, IRR returns a single value.
The internal rate of return calculated by the IRR function is expressed as a decimal, so an 8.25 percent internal rate of return produces a result value of .0825
.
All the cash flows used to compute a result value are assumed to occur at the same relative point within the period with which they are associated.
Cash flows that corresponds to outofstatus dimension positions are ignored.
IRR is affected by the NASKIP option. When NASKIP is set to YES
(the default), IRR ignores NA
values and computes the internal rate of return using the cash flows that are available. When NASKIP is set to NO
, IRR returns NA
when any cash flow has a value of NA
. When all the cash flows are NA
, IRR returns NA
for either setting of NASKIP.
Some series of cash flows have multiple discount rates, which make the net present value equal to zero. In such cases, IRR will find and return only one of these discount rates as the internal rate of return. When there is only a single solution and it is between 99.9 percent and 10,000 percent, the IRR function will find it. When IRR cannot calculate an internal rate of return, the corresponding value in the result is NA
.
Examples
Example 1520 Calculating the Internal Rate of Return
The following statements create a dimension called project
, add values to it, and create a variable called cflow
, which is dimensioned by year
and project
.
DEFINE project DIMENSION TEXT MAINTAIN project ADD 'a' 'b' 'c' 'd' 'e' DEFINE cflow VARIABLE DECIMAL <project year>
Once you have assigned the following values to CFLOW,
CFLOW PROJECT YEAR a b c d e       Yr95 200.00 200.00 300.00 100.00 200.00 Yr96 100.00 150.00 200.00 25.00 25.00 Yr97 100.00 400.00 200.00 100.00 200.00
then the following statement
REPORT IRR(cflow, year)
produces the following report of the internal rate of return.
IRR(CFLOW, PROJECT YEAR)   a 0.00 b 0.84 c 0.22 d 0.13 E 0.06