Reply
Nagesh20
Helper I
Helper I
Partially syndicated - Outbound

Calculate XIRR from two tables

Hi all,

 

Trying to calcaulate XIRR from the below two tables. It woud be helpful if anyone can provide the right DAX formula.

 

Getting IRR in excel is 17.13%

 

Cashflow table

Date           Fund         Cashflow

3/1/2022Quantum2000
3/1/2022LIC500
4/1/2022LIC300
4/1/2022Quantum3000

 

NAV table

Date          Fund       Cashflow

3/1/2024Quantum-3000
3/1/2024Quantum-4000
3/1/2024LIC-900

 

Relationship

Nagesh20_1-1709299823220.png

 

1 ACCEPTED SOLUTION

Syndicated - Outbound

Try the following :

 

IRR2 = 
SUMMARIZE(
    Transactions_All,
    Transactions_All[Fund],
    "IRR", [Your_IRR_Calculation_Measure] // I assume you have a measure that calculates IRR
)

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

5 REPLIES 5
Nagesh20
Helper I
Helper I

Syndicated - Outbound

Hi @AmiraBedh 

 

I am getting the correct IRR number of 17.13% with this formula 

 

IRR =
VAR Total_Cashflow = UNION(SELECTCOLUMNS(Cashflow,"Cashflow",Cashflow[Cashflow],"date",Cashflow[Date]),
SELECTCOLUMNS(NAV,"Cashflow",NAV[Cashflow],"date",NAV[Date]))
Return
XIRR(Total_Cashflow,[Cashflow],[date])
 
But when i apply the filter for the specific "Fund", it's getting different IRR number 
In Excel, Getting IRR for Quantum is 18.81%, for LIC is 6.16%
 
In reality, there are huge list of fund names to filter
 
Please help me how to get this sorted out.

Syndicated - Outbound

Hi @AmiraBedh 

 

Finally it's resolved it by creating table and created a measure function

 

Transactions_All = UNION(SELECTCOLUMNS(Cashflow,"Cashflow",Cashflow[Cashflow],"date",Cashflow[Date],"Account",Cashflow[Account],"Fund",Cashflow[Fund]),
SELECTCOLUMNS(NAV,"Cashflow",NAV[Cashflow],"date",NAV[Date],"Account",NAV[Account],"Fund",NAV[Fund]))
 
IRR2 = XIRR(Transactions_All,Transactions_All[Cashflow],Transactions_All[date])
 
I would like to get IRR reflect in a table with Fund name like below. It would be great if provide a solution on this
 
FundIRR2
Quantum18.81%
LIC6.61%

Syndicated - Outbound

Try the following :

 

IRR2 = 
SUMMARIZE(
    Transactions_All,
    Transactions_All[Fund],
    "IRR", [Your_IRR_Calculation_Measure] // I assume you have a measure that calculates IRR
)

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Syndicated - Outbound

Hi,

Share the download link of the PBI file.  Show the problem and the expected result clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
AmiraBedh
Super User
Super User

Syndicated - Outbound

You forgot to share the formula 🙂


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)