NPV  chart function
NPV() returns the aggregated net present value of an investment based on a discount_rate per period and a series of future payments (negative values) and incomes (positive values,) represented by the numbers in value, iterated over the chart dimensions. The payments and incomes are assumed to occur at the end of each period.
Syntax:
NPV([TOTAL [<fld {,fld}>]] discount_rate, value)
Return data type: numeric The result has a default number format of money.
Arguments:
Argument  Description 

discount_rate  discount_rate is the rate of discount over the length of the period. 
value  The expression or field containing the data to be measured. 
TOTAL 
If the word TOTAL occurs before the function arguments, the calculation is made over all possible values given the current selections, and not just those that pertain to the current dimensional value, that is, it disregards the chart dimensions. By using TOTAL [<fld {.fld}>], where the TOTAL qualifier is followed by a list of one or more field names as a subset of the chart dimension variables, you create a subset of the total possible values. Defining the aggregation scope The TOTAL qualifier may be followed by a list of one or more field names within angle brackets. These field names should be a subset of the chart dimension variables. In this case, the calculation is made disregarding all chart dimension variables except those listed, that is, one value is returned for each combination of field values in the listed dimension fields. Also, fields that are not currently a dimension in a chart may be included in the list. This may be useful in the case of group dimensions, where the dimension fields are not fixed. Listing all of the variables in the group causes the function to work when the drilldown level changes. 
Limitations:
discount_rate and value must not contain aggregation functions, unless these inner aggregations contain the TOTAL qualifier. For more advanced nested aggregations, use the advanced aggregation function Aggr, in combination with calculated dimensions.
Text values,
Examples and results:
Example  Result 


$540.12 
Data used in examples:
Cashflow:
LOAD 2013 as Year, * inline [
DateDiscountPayments
201301010.110000
201303010.13000
201310300.14200
201402010.26800
] (delimiter is '');