Forum Discussion
Anonymous
4 years agoNot applicable
Time between shift finish time and next shift start time
Hi, Trying to find the "Break Time" between the shift finish time & the next shift start time per employee. Attached is an excample of the shifts worked by one employee in a typical day. Sample...
- 4 years ago
Anonymous
4 years agoNot applicable
CNENFRNL Thks for your help. I just needed to add an earlier date filter to your code to get it to do what I needed.
Thks again. Much appreciated.
Break =
var __prev =
MAXX(
TOPN(
1,
FILTER('powerbi114 view_finance',
'powerbi114 view_finance'[carer_id] = EARLIER('powerbi114 view_finance'[carer_id])
&& 'powerbi114 view_finance'[date] = EARLIER('powerbi114 view_finance'[date])
&& 'powerbi114 view_finance'[Sched_Finish] <= EARLIER('powerbi114 view_finance'[Sched_Start])
),
'powerbi114 view_finance'[Sched_Finish]
),
'powerbi114 view_finance'[Sched_Finish]
)
return
IF( NOT ISBLANK(__prev),'powerbi114 view_finance'[Sched_Start]- __prev)