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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
dmbd1904
Helper III
Helper III

XIRR DAX Help

Hi I've been trying for hours to make this work without success. Does anybody know if it's possible to use a measure as the cashflow part of a XIRR function?

 

Measure 2 =
VAR CALC2=
(-CALCULATE(
    SUM('Asta'[Property Commercial Value]),Asta[Activity]="Ready to Snag",Asta[Attribute]="Forecast Finish"))

+
CALCULATE(
    SUM('Salesforce Properties'[Agreed_Price__c]),USERELATIONSHIP('Calendar'[Date],'Salesforce Properties'[Forecast_Closed_Date_Sales__c]))



RETURN XIRR('Calendar',CALC2,'Calendar'[Date])
1 ACCEPTED SOLUTION

Hi @v-xicai, the issue was where the cashflow calculations returned a blank value. To overcome this I used an IfError statement within the XIRR calc. Thanks for your replies

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi   @dmbd1904 ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

Hi @v-xicai, the issue was where the cashflow calculations returned a blank value. To overcome this I used an IfError statement within the XIRR calc. Thanks for your replies

v-xicai
Community Support
Community Support

Hi @dmbd1904 ,

 

For the article of XIRR function, we know the table in function is like cashflow table instead of a calendar table,  You may change the formula like DAX below. Or you may show us your formula error message for further analysis.

 

Syntax: XIRR(<table>, <values>, <dates>, [guess])

 

Measure 2 =

VAR CALC2=

(-CALCULATE(

    SUM('Asta'[Property Commercial Value]),Asta[Activity]="Ready to Snag",Asta[Attribute]="Forecast Finish"))

+

CALCULATE(

    SUM('Salesforce Properties'[Agreed_Price__c]),USERELATIONSHIP('Calendar'[Date],'Salesforce Properties'[Forecast_Closed_Date_Sales__c]))


RETURN XIRR('Asta',CALC2,'Calendar'[Date])

 

For reference:

 

Rolling XIRR Calculation

 

XIRR in differents periods

 

Solution to XIRR with Terminal Values

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@dmbd1904 , refer if this can help

https://www.thebiccountant.com/2017/05/23/goal-seeking-and-xirr-in-powerbi-and-powerquery/

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.