Forum Discussion

Karthik12's avatar
Karthik12
Post Patron
3 years ago
Solved

Time difference between current output and previous output

Hello Folks, My production server data has  time values in same coloumn (please refer attached picture). Request your help to calculate the time difference between two outputs in my production data...
  • v-yalanwu-msft's avatar
    3 years ago

    Hi, Karthik12 ;

    You could try it.

    1.create a column

     

    diff = 
    var _last=
    CALCULATE(MAX('Table'[Time]),FILTER('Table',[Time]<EARLIER('Table'[Time])&&[Date]=EARLIER('Table'[Date])))
    return DATEDIFF(_last,[Time],SECOND)

     

    2.set top 3:

    If the above one can't help you get the desired result, please provide a simple and your expected result with backend logic and special examples.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.