Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Hours worked calculation

PNC97
8 - Asteroid

I trying to find out the hours worked and breaks time in between by the condition

 

For Hours worked:

if Name = Row+1 Name and if Event Date = Row+1 Event date then the math should be if Punch out is greater then Row+1: Punch out - Row-1: Punch In else  Row-1: Punch In - row+1: Punch out 

 

if the condition Name = Row+1 Name and if Event Date = Row+1 Event date  is not satisfied then if Punch out is greater than punch in then punch out - punch in else punch in - punch out 

 

For Break:

 

if Name = Row+1 Name and if Event Date = Row+1 Event date then the math should be if Punch out is greater then Row+1: Punch out - Row-1: Punch In else  Row-1: Punch In - row+1: Punch out 

 

For Punch out: 

if Name = Row+1 Name and if Event Date = Row+1 Event date then the math should be Row+1: Punch out else Punch out 

 

For more clarification I had attached excel with Conditions and sample data.

 

Expecting workflow 😊

Thanks in advance 

 

1 REPLY 1
BrandonB
Alteryx
Alteryx

I think this should do the trick for you

 

BrandonB_0-1625011485463.png

 

Labels
Top Solution Authors