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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.