Forum Discussion
How to calculate IRR using DAX
- 3 years ago
I loaded your Data table exactly as in your post, and tried your IRR measure, and did get a result of 0.45%.
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.
Please post back if needed.
Regards
I loaded your Data table exactly as in your post, and tried your IRR measure, and did get a result of 0.45%.
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.
Please post back if needed.
Regards
- sanjaymithran3 years ago
Helper II
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