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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
NorthW
Regular Visitor

Table of XIRR for Each Quarter (Value and Dates arguments empty)

I'm trying to create a simple table of IRRs for an investment at each quarter end (as below)

NorthW_0-1631871900097.png

The challenge is that the data includes an investment value at each quarter end but I only want the calculation to include the most recent quarter end valuation ("NAV"). See the sample of the date below:

NorthW_1-1631872064293.png

The IRR measure I've created is as follows:

 

IRR =

VAR mdate = MAX('Fund Operations'[Date])
Return
Calculate(
xirr('Fund Operations','Fund Operations'[Cashflows],'Fund Operations'[Date]),
filter(ALLEXCEPT('Fund Operations','Fund Operations'[Fund]),
'Fund Operations'[Operation Type] = "Drawn Capital" && 'Fund Operations'[Date] <= DATEVALUE(mdate)||'Fund Operations'[Operation Type] = "NAV" &&
'Fund Operations'[Date] = DATEVALUE(mdate)
))
 
I'm trying to retain the filter on Fund because there are  multiple funds in the data table so I want the report filter to be kept and only run the calculation on the specified fund. I'm then trying to take the quarter end date and pick up all cashflows up to that date for the "drawn capital" cash flows but only the "NAV" at the quarter end.  If I create a dummy table with this filter it works fine (although i have to hard code mdate), similarly if i remove the calculation and just return mdate I can see that the correct date is being picked up each quarter. For some reason though when the filter is added using the mdate variable i get an error to tell me the XIRR dates and cash flows are empty.  Any help would be appreciated,  I can't think of any other ways to check the calculation logic and resolve.
3 REPLIES 3
NorthW
Regular Visitor

Hi,  Thanks for your message,  I tried to use your measure but get the same error still.  To explain further what i'm trying to do,  the NAVs are for the same fund but at different times.  I'm trying to get the report to generate the below tables and calculate the IRRs at the different dates and then display them in one table.  So using the data in my initial question, the first date would be December : 

 

NorthW_0-1632156306678.png

Then for march the calculation would ignore the december 2019 cash flow and use the nav in March :

NorthW_1-1632156344565.png

Finally in June it would ignore both previous NAV cash flows:

NorthW_2-1632156372023.png

 

The output would then look like this:

 

NorthW_3-1632156391264.png

 

Any additional help you could provide would be appreciated.  Thanks!

 

I've been trying to solve this exact issue recently - can I ask if you managed to resolve the issue in the end?

Anonymous
Not applicable

Hi @NorthW ,

 

Not very clear.

If you want to calculate different XIRR based on each Fund, please try:

IRR = 
VAR mdate =
    MAX ( 'Fund Operations'[Date] )
RETURN
    CALCULATE (
        XIRR (
            'Fund Operations',
            'Fund Operations'[Cashflows],
            'Fund Operations'[Date]
        ),
        FILTER (
            'Fund Operations',
            [Fund]
                IN ALLSELECTED ( 'Fund Operations'[Fund] )
                    && [Operation Type] = "Drawn Capital"
                    && [Date] <= DATEVALUE ( mdate )
                    || [Operation Type] = "NAV"
                        && [Date] = DATEVALUE ( mdate )
        )
    )

Eyelyn9_0-1632116882053.png

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors