Daily DAX : Day 440 XIRR

Power BI DAX Function: XIRR

The XIRR function in DAX (Data Analysis Expressions) calculates the Internal Rate of Return (IRR) for a series of cash flows that occur at irregular intervals. It is particularly useful for financial analysis where payments or receipts do not happen periodically.

What is XIRR?

XIRR stands for eXtended Internal Rate of Return. It finds the interest rate that makes the net present value (NPV) of the cash flows equal to zero, accounting for the exact timing of each cash flow using specific dates.

  • Negative values typically represent outflows (e.g., investments or costs).
  • Positive values represent inflows (e.g., returns or income).
  • There must be at least one positive and one negative cash flow for the calculation to work.

Syntax

XIRR(, ,  [, ] [, ])

Parameters

Parameter Description
A table expression containing the cash flows and dates (usually a reference to a table).
A column in the table containing the cash flow amounts (negative for outflows, positive for inflows).
A column in the table containing the corresponding dates for each cash flow.
(optional) A decimal number guessing the expected IRR (default is 0.1 or 10%). Helps convergence in complex cases.
(optional) Value to return if no valid IRR is found (e.g., BLANK() or 0).

Example

Assume a table named CashFlows with columns: [Date] and [Amount].

XIRR_Measure = XIRR(CashFlows, CashFlows[Amount], CashFlows[Date])

Sample data:

Date Amount
2024-01-01 -10000
2024-06-15 5000
2025-12-27 8000

This might return an IRR of approximately 0.35 (35%), depending on exact calculations.

Use Cases

  • Investment Performance: Calculate returns on investments like mutual funds, stocks, or private equity with irregular contributions/redemptions.
  • Project Evaluation: Assess profitability of projects with non-uniform cash flows (e.g., construction projects).
  • Loan Analysis: Determine effective interest rates for loans with irregular payments.
  • Portfolio Reporting: In Power BI dashboards, show annualized returns for financial portfolios.

Notes

  • Avoid zero values in cash flows as they can cause errors or don't affect results.
  • Dates must be in ascending order internally (DAX handles sorting).
  • If convergence fails, try providing a or handle with .

Comments

Popular posts from this blog

Daily DAX : Day 131 SELECTEDMEASURE

Daily DAX : Day 446 INFO.CSDLMETADATA

Daily DAX : Day 453 ENDOFWEEK