Forum Discussion
DAX DATEDIFF funny behaviour
- 3 years ago
Hello gancw1 ,
yes, the datediff measure you're using is set do determine the difference between two dates by year, and in the line 3 and 5 the hire date and end date are in the same year which is 2022, thus the result is correct to be zero because it's in the same year.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Hello gancw1 ,
yes, the datediff measure you're using is set do determine the difference between two dates by year, and in the line 3 and 5 the hire date and end date are in the same year which is 2022, thus the result is correct to be zero because it's in the same year.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Thanks for the explanation.
Seems like the DAX DATEDIFF( ) behaves differently from the Excel DATEDIF( ). In EXCEL row 2 to 6 will return 0 while DAX return 0 zero or 1 depending on the start/end year and not based on the actual duration