Forum Discussion

gancw1's avatar
gancw1
Icon for Resolver II rankResolver II
3 years ago
Solved

DAX DATEDIFF funny behaviour

I am trying to calculate the duration between 2 dates and I observed some funny behavior with the DAX DATEDIFF() function   Diff / 365 = (End Date - Hire Date) / 365 DAX Year = DATEDIFF (Hire Date...
  • Idrissshatila's avatar
    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 👍

    Follow me on Linkedin