Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello,
i need your support to calculate XIRR values of my mutual fund investment. I have a table as below
| Date | Transaction Amount | Transaction Type | Investment Category |
| 05-12-2019 | -10000 | Buy | Debt |
| 08-12-2019 | -90000 | Buy | Debt |
| 23-12-2019 | 50000 | Sell | Debt |
| 14-01-2020 | 40000 | Sell | Debt |
| 25-02-2020 | -10000 | Buy | Equity |
| 02-03-2020 | -50000 | Buy | Debt |
| 03-03-2020 | -5000 | Buy | Equity |
| 09-03-2020 | -2500 | Buy | Equity |
| 13-03-2020 | -2500 | Buy | Equity |
| 24-03-2020 | -2500 | Buy | Equity |
| 03-04-2020 | -2500 | Buy | Equity |
| 15-04-2020 | -11500 | Buy | Debt |
| 16-04-2020 | -6500 | Buy | Equity |
| 14-06-2020 | -232000 | Buy | Debt |
| 05-08-2020 | 306027.52 | Sell | Debt |
| 10-08-2020 | -99995 | Buy | Debt |
| 31-08-2020 | 100142.49 | Sell | Debt |
| 10-09-2020 | -99995 | Buy | Debt |
| 21-09-2020 | 25000 | Sell | Debt |
| 11-01-2021 | 25000 | Sell | Debt |
| 26-01-2021 | 50859.19 | Sell | Debt |
| 03-02-2021 | 6.88 | Sell | Debt |
| 02-03-2021 | -9999.5 | Buy | Equity |
| 31-03-2021 | -9999.5 | Buy | Equity |
| 05-04-2021 | -49997.5 | Buy | Equity |
| 07-04-2021 | -9999.5 | Buy | Equity |
| 12-04-2021 | -7999.6 | Buy | Equity |
| 28-04-2021 | -9999.5 | Buy | Equity |
| 07-05-2021 | -9999.5 | Buy | Equity |
| 28-05-2021 | -9999.5 | Buy | Equity |
| 08-06-2021 | -9999.5 | Buy | Equity |
| 28-06-2021 | -9999.5 | Buy | Equity |
| 07-07-2021 | -9999.5 | Buy | Equity |
| 27-07-2021 | -9999.5 | Buy | Equity |
| 09-08-2021 | -9999.5 | Buy | Equity |
| 16-11-2021 | 59160.07 | Sell | Equity |
| 22-11-2021 | -24998.75 | Buy | Equity |
| 17-12-2021 | -9999.5 | Buy | Equity |
| 20-12-2021 | -9999.5 | Buy | Equity |
| 27-01-2022 | -4999.75 | Buy | Equity |
| 01-02-2022 | -9999.5 | Buy | Debt |
| 07-02-2022 | -4999.75 | Buy | Equity |
| 10-02-2022 | -4999.75 | Buy | Equity |
| 15-02-2022 | -24998.75 | Buy | Debt |
| 16-02-2022 | -4999.75 | Buy | Equity |
| 18-02-2022 | -24998.75 | Buy | Equity |
| 28-02-2022 | -4999.75 | Buy | Equity |
| 01-03-2022 | -9999.5 | Buy | Debt |
| 10-03-2022 | -4999.75 | Buy | Equity |
my question is how to calculate XIRR of my investments in the above format? also the current market value is not in the transaction table mentioend above and it is in different table. how to bring these tables together and calculate the XIRR value?
Thanks
Solved! Go to Solution.
Hii @rk_nithi
Here the link of my pbix file :
This is my proposition:
Create a single table in Power Query.
1. Transform the actual value to get a Table like that:
| Date | Transaction Type | Cashflow |
| 20/11/2025 | Overall Portfolio | 95.000 |
DateTime.LocalNow()
For the transaction Table, you will have something like this:
Now you can easily use the XIIR function with both table
XIRR_Investment =
XIRR(Transactions, Transactions[Cashflow], Transactions[Date])
NB: The data I use may differ from yours.
Hi @rk_nithi ,
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank @Ohouot225 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you
Best Regards,
Community Support Team
Make sure that the
Transaction Amount
Date
Hii @rk_nithi
Below are the exact items you must create:
Cashflow =
IF(
'Transactions'[Transaction Type] = "Buy",
- 'Transactions'[Transaction Amount],
'Transactions'[Transaction Amount]
)
CurrentValue_CF :=
MAX('CurrentValue'[Current Value])
Final_CF = 'Transactions'[Cashflow]
XIRR_Investment :=
VAR CF =
UNION(
SELECTCOLUMNS(
ALL('Transactions'),
"Amount", 'Transactions'[Cashflow],
"Date", 'Transactions'[Date]
),
ROW(
"Amount", [CurrentValue_CF],
"Date", TODAY()
)
)
RETURN
IF(
HASONEVALUE('Transactions'[Date]),
BLANK(),
XIRR(CF, [Amount], [Date])
)
Hi Rohit1991,
can you please share the pbix file for better understanding?
Hii @rk_nithi
Here the link of my pbix file :
This is my proposition:
Create a single table in Power Query.
1. Transform the actual value to get a Table like that:
| Date | Transaction Type | Cashflow |
| 20/11/2025 | Overall Portfolio | 95.000 |
DateTime.LocalNow()
For the transaction Table, you will have something like this:
Now you can easily use the XIIR function with both table
XIRR_Investment =
XIRR(Transactions, Transactions[Cashflow], Transactions[Date])
NB: The data I use may differ from yours.
Hi @rk_nithi ,
according to the definition of the XIRR function (XIRR( CashFlows, [Payment], [Date] )) I would try:
XIRR(Your Table Name, [Transaction Amount], [Date])
Did you already try that?
What do you want to do with the "current market value"?
Hi DNMAF,
Thanks for the reply, in my table only transactions of bought and sold details are available and you know the value of previous investments would change as per per market value. So the current value of total investments would be different than the invested amount. to calculate overall return on investment , i think we should calculate difference between current market value and invested value right? my question is in the XIRR formula there is no possibility to consider current market value, how to accommodate that?
Hi @rk_nithi ,
to include the current market value you could do the following (assuming that the current market values are positive and the table with the market values has a date column):
Does that fulfil your requirements?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 55 | |
| 53 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 122 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |