Good morning,
In Tableau, I have a list of shifts that have :
- Planned start time
- Planned end time
For each shift, a person has to log-in and then log-out. Someone can log-in and log out multiple times during a shift. So for a given shiftnumber there is one unique Planned start time, one unique Planned end time, but there could be several Log in times and Log out times.
I would like for each shift, to understand if the people were late in shift or logged out too early. To do so I would need to calculated :
- The delta between Planned start time and THE FIRST Log in time for this shift
- The delta between Planned end time and the LAST Log out time for this shift
I have tried using LOOKUP() and FIRST() but the syntax I used is probably not correct as it returns the same value for all rows.
Below an example of shift where there is 2 log-in time.