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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Nagesh20
Helper I
Helper I

XIRR error with different methods

Hi All,

 

I have used the following two methods to calculate XIRR. Both are giving the right values as like as in the excel. But when coming to calculate XIRR, it’s getting error. In excel, it’s showing IRR of around 2.2%. After struggling for many hrs, I am reaching out for the help. Please someone assist on this query. Any either of below method works for IRR calculation below, that would suffice.

 

Total_Value 1st method =

var Running_ =

CALCULATE(SUM(Fund[Daily NAV]),FILTER(ALL(Fund[Date]),Fund[Date]<=MAX(Fund[Date]))) -- Running total for daily NAV

Var _max=maxx(filter(allselected(Fund), Fund[Fund] = max(Fund[Fund])&&Fund[User]=MAX(Fund[User]) ), Fund[Date])

return

-Switch ( true(),Max(Fund[Date]) = _max ,Running_,Max(Fund[Date]) < _max ,0.1) -- locking Ending NAV from Running total based on Max date

+SUM(Fund[Call])-SUM(Fund[Distribution])

 

IRR_1st method = XIRR(Fund,Fund[Total_Value 1st method],Fund[Date],,0.0001)

Nagesh20_0-1716030416116.png

 

 

2nd method

Total_Value 2nd method =

var Running_ =

CALCULATE(SUM(Fund[Daily NAV]),FILTER(ALL(Fund[Date]),Fund[Date]<=MAX(Fund[Date]))) -- Running total for daily NAV

Var _max=maxx(filter(allselected(fund), Fund[Fund]= max(Fund[Fund])&&Fund[User]=MAX(Fund[User]) ), Fund[Date])

return

-Switch ( true(),Max(Fund[Date]) = _max ,Running_, Max(Fund[Date]) < _max ,0.1,blank()) -- locking Ending NAV from Running total based on Max date

+SUM(Fund[Call])-SUM(Fund[Distribution])

 

IRR_2nd method = XIRR(Fund,Fund[Total_Value 2nd method],Fund[Date],,0.0001)

 

Nagesh20_1-1716030416118.png

 

DateUserFundCallDistributionDaily NAV
4/5/2022SecondFund15000500
6/5/2022SecondFund1025-25
7/5/2022SecondFund126036
7/6/2022SecondFund1000
8/5/2022SecondFund13545-10
9/5/2022SecondFund11000100
4/5/2023ThirdFund1100001000
5/5/2023ThirdFund145045
5/5/2023SecondFund125025
6/5/2023ThirdFund1025-25
7/5/2023ThirdFund126036
8/5/2023ThirdFund13545-10
9/5/2023ThirdFund11000100
9/5/2023SecondFund10026
3/5/2024FirstFund11000100
4/5/2024FirstFund150050
5/5/2024FirstFund125026
6/5/2024FirstFund15000502
7/5/2024FirstFund10100-100
9/5/2024FirstFund175075
9/5/2024SecondFund1000
10/5/2024FirstFund10250-250
10/5/2024ThirdFund10026

 

 

1 REPLY 1
amitchandak
Super User
Super User

@Nagesh20 , refer, this can help

https://www.youtube.com/watch?v=N1WRSFuaFmE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.