Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Employee Attendance Based on Two Shifts

Hello all,

 

I'm facing a problem in calculating two shifts for employees.

 

I calculated the first shift as early as the employee can come by using this measure:

Earliest Local Today = CALCULATE(MIN('EVENTS'[EVENT_TIME_LOCAL]), FILTER('EVENTS', DATE(YEAR('EVENTS'[EVENT_TIME_LOCAL]), MONTH('EVENTS'[EVENT_TIME_LOCAL]), DAY('EVENTS'[EVENT_TIME_LOCAL])) = TODAY()))
 
But then I cant make any filters on it for the second shift that starts at 2:30 P.M.
 
A you can see 'EVENTS' table consist of all employees actions when they swipe the card without considering two shifts.
 
 
Note that its dynamic data and I want the first swipe after 2:30 on this current day, because employees can swipe more than one time while entering or going out of the building for a break.
 
 
Thank you so much.

3 Replies

  • Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      yes sure! but I'm new to the whole Power BI community thing how can I share?