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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Daxmax
Helper I
Helper I

Calculate IRR from inception until slicer selection, while other metrics only for that selection

Hello Community,

 

My report needs to display IRR from inception until the year and quarter selected in the slicer, while the same report has other metrics that display only for the year and quarter selected. I'm using XIRR formula.

 

The report has a slicer for Year, and another for Quarter.

If I make a selection in the slicer for year = 2020, and quarter = Q3, the other metrics display the correct values (since the data in the respective tables have columns for Year and Quarter), but the IRR metric will incorrectly show me the value for Q3 of 2020. I need that card to show me the IRR up to Q3 of 2020.

 

(For context, an IRR table usually consists of date, and the cash flow. When the asset is purchased, that date is the inception date and it has a negative cash flow associated with that date. During the life of the investment, there are cash distributions i.e. positive cash flow, and the last date consists the selling price of that asset. Hence showing the IRR for Q3 of 2020 only will result in an error, because the XIRR formula needs to see both positive and negative cash flows)

 

I'm using the same calendar lookup table for IRR and the other metrics in my data model.

 Data Model IRR.png

 

1 ACCEPTED SOLUTION
Daxmax
Helper I
Helper I

Hi community, i was able to figure out the issue. I had to remove filter context using ALL(), and then use XIRR. 

My measure is 

 

measure=
var quarter = SELECTEDVALUE(table[quarter])
return CALCULATE(XIRR(.....), ALL(table[quarter]), table[quarter] <= quarter))

View solution in original post

3 REPLIES 3
Daxmax
Helper I
Helper I

Hi community, i was able to figure out the issue. I had to remove filter context using ALL(), and then use XIRR. 

My measure is 

 

measure=
var quarter = SELECTEDVALUE(table[quarter])
return CALCULATE(XIRR(.....), ALL(table[quarter]), table[quarter] <= quarter))

amitchandak
Super User
Super User

@Daxmax , are u using xirr of power bi ?

https://docs.microsoft.com/en-us/dax/xirr-function-dax

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

@amitchandak , yes i'm using XIRR of PowerBI

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors