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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Nagesh20
Helper I
Helper I

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

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

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.

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%

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

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
Resident Rockstar
Resident Rockstar

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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