Forum Discussion
XIRR function cannot find solution
- 8 years ago
I realize this is a sample however, XIRR Function (DAX) states:
Return Value
Internal rate of return for the given inputs. If the calculation fails to return a valid result, an error is returned.
as well as the following:
Remarks
The value is calculated as the rate that satisfies the following function:
The series of cash flow values must contain at least one positive number and one negative number.
Does your data meet must contain at least one positive number and one negative number?
I added another row with 100,000 in your sample set and it produced a value in the measure.
I realize this is a sample however, XIRR Function (DAX) states:
Return Value
Internal rate of return for the given inputs. If the calculation fails to return a valid result, an error is returned.
as well as the following:
Remarks
The value is calculated as the rate that satisfies the following function:
The series of cash flow values must contain at least one positive number and one negative number.
Does your data meet must contain at least one positive number and one negative number?
I added another row with 100,000 in your sample set and it produced a value in the measure.
I keep getting the same error for my data, could you please help me get the XIRR value? Here is my sample data. I do not understand why the XIRR function is not working on this data set. Also, just want to know if XIRR function is optimized for direct query? According to the optimized dax functions list for direct query, XIRR is not listed in there. Can you please confirm this?
Thank you very much for your help,
| Month | Cashflow |
| 9/1/2015 | 0 |
| 10/1/2015 | 2530756 |
| 11/1/2015 | 2710211 |
| 12/1/2015 | 2979793 |
| 1/1/2016 | 2527118 |
| 2/1/2016 | 2796499 |
| 3/1/2016 | 2614789 |
| 4/1/2016 | 2777616 |
| 5/1/2016 | 2676319 |
| 6/1/2016 | 2994484 |
| 7/1/2016 | 2482082 |
| 8/1/2016 | 2703377 |
| 9/1/2016 | 2833793 |
| 10/1/2016 | 2518664 |
| 11/1/2016 | 2659052 |
| 12/1/2016 | 2690785 |
| 1/1/2017 | 2431973 |
| 2/1/2017 | 2646933 |
| 3/1/2017 | 2278861 |
| 4/1/2017 | 2323329 |
| 5/1/2017 | 2338517 |
| 6/1/2017 | 2537406 |
| 7/1/2017 | 2283102 |
| 8/1/2017 | 2317830 |
| 9/1/2017 | 2279586 |
| 10/1/2017 | 2393647 |
| 11/1/2017 | 2491507 |
| 12/1/2017 | 2041174 |
| 1/1/2018 | 2225666 |
| 2/1/2018 | 2377273 |
| 3/1/2018 | 1961357 |
| 4/1/2018 | 2095609 |
| 5/1/2018 | 2065100 |
| 6/1/2018 | 2144858 |
| 7/1/2018 | 2063577 |
| 8/1/2018 | 2233725 |
| 9/1/2018 | 2049687 |
| 10/1/2018 | 2021182 |
| 11/1/2018 | 2012237 |
| 12/1/2018 | 2134861 |
| 1/1/2019 | 2018427 |
| 2/1/2019 | 1997118 |
| 3/1/2019 | 1824474 |
| 4/1/2019 | 2026753 |
| 5/1/2019 | 2042240 |
| 6/1/2019 | 1779184 |
| 7/1/2019 | 2027999 |
| 8/1/2019 | 2030078 |
| 9/1/2019 | 1734192 |
| 10/1/2019 | 1871081 |
| 11/1/2019 | 2020876 |
| 12/1/2019 | 1821809 |
| 1/1/2020 | 2110641 |
| 2/1/2020 | 1582513 |
| 3/1/2020 | 1666309 |
| 4/1/2020 | 1961726 |
| 5/1/2020 | 1636368 |
| 6/1/2020 | 1607873 |
| 7/1/2020 | 1561124 |
| 8/1/2020 | 1512438 |
| 9/1/2020 | 1462936 |
| 10/1/2020 | 1419186 |
| 11/1/2020 | 1381266 |
| 12/1/2020 | 1375718 |
| 1/1/2021 | 1371869 |
| 2/1/2021 | 1368332 |
| 3/1/2021 | 1364890 |
| 4/1/2021 | 1361034 |
| 5/1/2021 | 1357726 |
| 6/1/2021 | 1354761 |
| 7/1/2021 | 1352805 |
| 8/1/2021 | 1351168 |
| 9/1/2021 | 1318704 |
| 10/1/2021 | 1317577 |
| 11/1/2021 | 1316801 |
| 12/1/2021 | 1263470 |
| 1/1/2022 | 1263078 |
| 2/1/2022 | 1262628 |
| 3/1/2022 | 1155687 |
| 4/1/2022 | 1154458 |
| 5/1/2022 | 1153272 |
| 6/1/2022 | 1005599 |
| 7/1/2022 | 1003438 |
| 8/1/2022 | 1001239 |
| 9/1/2022 | 802456.5 |
| 10/1/2022 | 799104.1 |
| 11/1/2022 | 795512.8 |
| 12/1/2022 | 434482.4 |
| 1/1/2023 | 425285.9 |
| 2/1/2023 | 415978.1 |
| 3/1/2023 | 155253 |
| 4/1/2023 | 143833.5 |
| 5/1/2023 | 132329.9 |
| 6/1/2023 | -284073 |
| 7/1/2023 | -297435 |
| 8/1/2023 | -310741 |
| 9/1/2023 | -444419 |
| 10/1/2023 | -460857 |
| 11/1/2023 | -477247 |
| 12/1/2023 | -650332 |
| 1/1/2024 | -1024136 |
| 2/1/2024 | -1253589 |
| 3/1/2024 | -941283 |
| 4/1/2024 | -954679 |
| 5/1/2024 | -968061 |
| 6/1/2024 | -662988 |
| 7/1/2024 | -675013 |
| 8/1/2024 | -686819 |
| 9/1/2024 | -348419 |
| 10/1/2024 | -358869 |
| 11/1/2024 | -369370 |
| 12/1/2024 | -145120 |
| 1/1/2025 | -154294 |
| 2/1/2025 | -163296 |
| 3/1/2025 | 40036.85 |
| 4/1/2025 | 31953.25 |
| 5/1/2025 | 23256.5 |
| 6/1/2025 | 109458 |
| 7/1/2025 | 100499.8 |
| 8/1/2025 | 91586.33 |
| 9/1/2025 | 233011.1 |
| 10/1/2025 | 224952.6 |
| 11/1/2025 | 216932.7 |
| 12/1/2025 | 278887 |
| 1/1/2026 | 271376.7 |
| 2/1/2026 | 263904.4 |
| 3/1/2026 | 326778.9 |
| 4/1/2026 | 319776.2 |
| 5/1/2026 | 312808.2 |
| 6/1/2026 | 348197.5 |
| 7/1/2026 | 341560.2 |
| 8/1/2026 | 334955.9 |
| 9/1/2026 | 381111.7 |
| 10/1/2026 | 374866 |
| 11/1/2026 | 368651.8 |
| 12/1/2026 | 403539.5 |
| 1/1/2027 | 397643.9 |
| 2/1/2027 | 391775.4 |
| 3/1/2027 | 443003.7 |
| 4/1/2027 | 437506.6 |
| 5/1/2027 | 432036.3 |
| 6/1/2027 | 460488.1 |
| 7/1/2027 | 455279.1 |
| 8/1/2027 | 450097 |
| 9/1/2027 | 475544.6 |
| 10/1/2027 | 470597.5 |
| 11/1/2027 | 465674.2 |
| 12/1/2027 | 481523 |
| 1/1/2028 | 475077.7 |
| 2/1/2028 | 468669.5 |
| 3/1/2028 | 486045.6 |