XNPV

Updated on

XNPV is a DAX function that returns the net present value for a schedule of cash flows.

Syntax

XNPV(
   Table,
   Values,
   Dates,
   Rate
)
Argument Properties Description
Table The table containing the rows for which the Values and Dates expressions will be evaluated.
Values An expression to be evaluated for each row of the table, which will yield a series of cash flows.
Dates An expression to be evaluated for each row of the table, which will yield a schedule of payment dates.
Rate The discount rate to apply to the cash flows.

Return Values

Net present value.

Remarks

  • The value is calculated as the following summation:

    j=1NPj(1+rate)djd1365

    Where:

    • Pj is the jth payment
    • dj is the jth payment date
    • d1 is the first payment date
  • The series of cash flow values must contain at least one positive number and one negative number.

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Example

The following calculates the present value of the CashFlows table:

= XNPV( CashFlows, [Payment], [Date], 0.09 )
Date Payment
1/1/2014 -10000
3/1/2014 2750
10/30/2014 4250
2/15/2015 3250
4/1/2015 2750

Present value = 2089.50

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/xnpv-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy