Forum Discussion
Venkateswara_ra
Helper I
6 years agoNeed DAX to calculate time difference between rows in same column
I have employee login date and time from the login date and time i need calculate log out date and time. In a day employee login first time as some activity and next time he's login in different act...
ryan_mayu
Super User
6 years ago
Please see the measures below
Column =
VAR newtime=CALCULATE(MIN(Sheet13[Time]),FILTER(Sheet13,DATEVALUE(Sheet13[Time])=DATEVALUE(EARLIER('Sheet13'[Time]))&&Sheet13[empId]=EARLIER(Sheet13[empId])&&Sheet13[Time]>EARLIER(Sheet13[Time])))
return if(ISBLANK(newtime),0,newtime-Sheet13[Time])*24*60*60However the output is slight different from yours.
14:11-14:35, 24 mins, 1440 seconds, why your output is 1380?
14:35-15:09 34 mins, 2440 seconds, why your output is 2340?
Please let me know if I misunderstand your request.