# @NPV

Calculates the Net Present Value of an investment based on the series of payments (negative values) and income (positive values).

Syntax

`@NPV (cashflowMbr, rateMbrConst, discountFlag [, XrangeList])`
Parameter Description

cashflowMbr

Member specification providing a series of numeric values.

rateMbrConst

Single member specification, variable name, or numeric expression, providing a constant value.

discountFlag

Single member specification, variable name, or numeric expression set to 0 or 1 to indicate whether the function should discount from the first period. 1 means do not discount from the first period.

XrangeList

Optional parameter specifying the range over which the function is calculated. If a range is not specified, Essbase uses the level 0 members from the dimension tagged as Time.

Can be a valid member name, a comma-delimited list of member names, cross dimensional members, or a return value from a member set function or range function (including @XRANGE).

For more information about rangeList and XrangeList, see Range List Parameters in the topic Range and Financial Functions.

Notes

Financial functions never return a value; rather, they calculate a series of values internally based on the range specified.

Example

In this example, Value is calculated with the following formula:

`Value = @NPV(Cash, Rate, 0, FY1990:FY1994, FY1995:FY2000);`

This example produces the following report:

```       FY1990  FY1991  FY1992  FY1993  FY1994  FY1995
======  ======  ======  ======  ======  ======
Cash   (1,000)   500     600     500  #MISSING  #MISSING
Rate       0      0       0       0   #MISSING  #MISSING
Value     296    296     296     296      296     296```

The following example assumes a Year dimension is added to Sample Basic. It calculates NPV using a multidimensional range.

```FIX ("100-10", "New York")
"Value" = @NPV(Cash, Rate, 0, @XRANGE("2011"->"Sep", "2012"->"Mar"));
ENDFIX
```

The above calculation is performed across the following multidimensional range specified by XrangeList:

```2011->Sep
2011->Oct
2011->Nov
2011->Dec
2012->Jan
2012->Feb
2012->Mar
```