morg
morg

Reputation: 1191

Tableau LOOKUP & FIRST / LAST value

Good morning,

In Tableau, I have a list of shifts that have :

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 :

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

Upvotes: 0

Views: 312

Answers (1)

sanminchui
sanminchui

Reputation: 156

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.

Upvotes: 0

Related Questions