Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jamessun1000
Frequent Visitor

IRR v.s. XIRR

Hi

 

 

Our business uses a Software package that reports IRR on IRR (rather than XIRR formula). When I source the cash flow data and create charts / tables etc the XIRR output in Power BI does not match our external software. 

 

At the moment I have a measure calculating the XIRR of cash flows applied to a Clustered Bar Chart (dependant on the filter I apply).

 

Is there a way to calculate the IRR rather than the XIRR? There is no IRR formula, but I was wondering whether I could apply the manual mathamatical formula and use a goal seek type approach to ensure the NPV = 0. Any other ideas would be much appreciated. 

 

4 REPLIES 4
OwenAuger
Super User
Super User

@jamessun1000

 

Since XIRR treats 1 year as 365 days, you can replicate the results of the Excel IRR function by constructing a table of dates that are at 365 day intervals.

 

The exact formula depends on your tables etc, but you can use a structure like this to generate the table of "dates":

VAR FirstDate = <first date>
VAR NumDates = <num dates>
VAR DateTableForIRR =
    GENERATESERIES ( FirstDate, FirstDate + ( NumDates - 1 ) * 365, 365 )
// Then use this table within the DAX XIRR function

Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

I am by no means a power user! I have been using for ~1-2months and I am not familiar with VAR (assuming this is entered in via Query Editor rather than DAX formula). 

 

An example of my data set is:

 

Project Start DatePeriodPeriodDateProject ID EquityCashFlow 
01-07-18015-07-18205                    (1,099,275)
01-07-18115-08-18205                          (58,785)
01-07-18215-09-18205                          (58,785)
01-07-18315-10-18205                          (58,785)
01-07-18415-11-18205                    (1,546,285)
01-07-18515-12-18205                          (96,285)
01-07-18615-01-19205                          (96,285)
01-07-18715-02-19205                          (96,285)
01-07-18815-03-19205                      2,000,000
01-07-18915-04-19205                      2,000,000
01-07-181015-05-19205                      2,000,000

 

What are my next steps?

Thanks for posting the sample data 🙂
Actually my above code snippet is DAX, as I am thinking of replicating the behaviour of IRR with the DAX XIRR function, by controlling the dates provided to XIRR.
Could you show me the IRR value you expect for Project 205 from the table of cashflows?

The critical thing to work out is the fractional number of years since time zero to assign to each cashflow.

Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn
Greg_Deckler
Super User
Super User

Hmm,

 

Well, here is an article from @ImkeF on goal seeking with XIRR that might help if you have the manual formula for IRR.  https://www.thebiccountant.com/2017/05/23/goal-seeking-and-xirr-in-powerbi-and-powerquery/

 

Also, here is an Idea you can vote for:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19469422-create-an-irr-function

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.