1

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.

enter image description here

morg
  • 1,173
  • 4
  • 18
  • 36
  • Good question. Post a small amount of sample data. How is your data structured? One table with a row per shift? And another table with a rows showing login/logout events? Something else? – Alex Blakemore May 02 '23 at 00:10

1 Answers1

0

Is there a field that has a unique identifier for employees, like an employee ID field? You could use a FIXED field based on ID that looks at the minimum app log in time, and then subtract. You could also set a filter, that [App Log in Time] must equal the minimum [App Log in Time] value, and then subtract from there. Same principles apply to [Plan Shift End Time]. For more specific help, I'd need to see more of how your data is set up.

sanminchui
  • 59
  • 1
  • 9