Forum Discussion

Jeyeline's avatar
Jeyeline
Icon for Helper III rankHelper III
1 year ago
Solved

How to calculate the difference between two dates with timeframes in a particular format

Hello All,

 

 I have to calculate the mean time to respond based on two fields, by calculating the difference between these fields
Reporting Date&Time: 18-01-2025 12:30:00 PM
Actual Date&Time: 19-01-2025 9:00:00 AM

However while using the difference functions i am not receiving the expected results.

Expectation is, calculating the difference in minutes. How that could be possible in DAX. Can anyone help on this

 

  • Try this DAX measure ...

     

    Duration = 
    DATEDIFF(
        SELECTEDVALUE(yourdata[Reporting Date&Time]),
        SELECTEDVALUE(yourdata[Actual Date&Time]),
        MINUTE
    )

      

    Please click the [accept solution] and thumbs up button. Thank you

4 Replies