Skip to main content Skip to complementary content


XNPV() returns the aggregated net present value for a schedule of cash flows (not necessarily periodic) represented by paired numbers in the expressions given by pmt and date iterated over the chart dimensions. All payments are discounted based on a 365-day year.


XNPV([TOTAL [<fld{,fld}>]] discount_rate, pmt, date)

Return data type: numeric The result has a default number format of money.


  • pmt: The expression or field containing the data to be measured.
  • date: The expression or field containing the schedule of dates corresponding to the cash flow payments given in pmt.
  • discount_rate: discount_rate is the rate of discount over the length of the period.
  • 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. The TOTAL qualifier may be followed by a list of one or more field names within angle brackets <fld>. These field names should be a subset of the chart dimension variables.

    Defining the aggregation scope


discount_rate, pmt and date must not contain aggregation functions, unless these inner aggregations contain the TOTAL qualifier. For more advanced nested aggregations, use the advanced function Aggr, in combination with a specified dimension.

Text values, NULL values and missing values in any or both pieces of a data-pair result in the entire data-pair being disregarded.

Examples and results:  

XNPV(Discount, Payments, Date): -$3164.35.

Data used in examples:


LOAD 2013 as Year, * inline [






] (delimiter is '|');

Learn more


Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: