cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## How to calculate IRR using DAX

Hi All,

XIRR=XIRR(Data,Data[Cash Flow],Data[DATE]) working fine we have function getting same as mentioned below.

I tried as explained  in that video getting 0% but in excel 0.45%

IRR =
XIRR (
'Data',
"Date365", CALCULATE (
COUNTROWS ( 'Data' ),
'Data'[DATE] < EARLIER ( Data[DATE]),
ALL ( 'Data' )
)
* 365
+ CALCULATE ( MIN ( Data[DATE] ), ALL ( 'Data') )
),
Data[Cash Flow],
[Date365]
) )

1 ACCEPTED SOLUTION
Super User

See attached PBIX.

To confirm, do you want to replicate the behaviour of the Excel IRR function, which takes an ordered list of cashflows and assumes they occur at 1-year intervals (in this case by ignoring the DATE column)?

You can also write this more simply as something like this:

``````IRR 2 =
XIRR (
'Data',
Data[Cash Flow],
RANK ( DENSE, ALL ( 'Data'[DATE] ) )
* 365
)``````

The interval between the Date values is important, rather than their magnitude, so there is no need to add the minimum date.

Regards

Owen Auger
Blog
2 REPLIES 2
Super User

See attached PBIX.

To confirm, do you want to replicate the behaviour of the Excel IRR function, which takes an ordered list of cashflows and assumes they occur at 1-year intervals (in this case by ignoring the DATE column)?

You can also write this more simply as something like this:

``````IRR 2 =
XIRR (
'Data',
Data[Cash Flow],
RANK ( DENSE, ALL ( 'Data'[DATE] ) )
* 365
)``````

The interval between the Date values is important, rather than their magnitude, so there is no need to add the minimum date.

Regards

Owen Auger
Blog
Helper I

Hi OwenAuger,

Thanks for reply,the below one is detail data for which i posted yesteday is summary,same formula apply here not getting correct result its show 0% instead of 0.45% we have country,sponsor and Launch date slicer

Not able to attach file will split send agail

Announcements

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors