Alteryx Designer Desktop Discussions

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

Need help in grouping data based on minimum time and maximum time interval.

kapilthakur
7 - Meteor

I have dataset in which i need to group by data based on time interval for employees. Data set is having employee id, date, Time interval for each employee.

Input looks like:

Emp_IdDate Time interval 
87936228/10/2023 09:00
87936228/10/202310:00
87936228/10/202311:00
87936228/10/202312:30
87936228/10/202314:30
87936228/10/202318:00
68666628/10/2023 08:00
68666628/10/2023 09:30
68666628/10/202312:30
68666628/10/202314:00

 

As you see emp_id 879362 and 686666 is having multiple records for same date but the time interval is different every time. So in the output I expect to see only start (minimum time) and end (maximum time). 

 

For example, consider emp_id 879362, On 28/10/2023 he is starting his work from 09:00 and ends his day by 18:00 so i just need start time and end time of every employee. 

 

Output should be like:

 

Emp_IdDate Start Time End time.
87936228/10/2023 09:0018:00
62686628/10/202310:0014:00

 

Kindly attach the photos with logics as I can't access Alteryx application as of now so it would be great help if someone provides the snip with all logic.

 

Thanks in advance. 

 

   

3 REPLIES 3
binuacs
21 - Polaris

@kapilthakur use the summarise tool

image.png

Qiu
21 - Polaris
21 - Polaris

@kapilthakur 
Just trying another approach.

We can first sort the data by Employee iD and Interval time then use Sample Tool to pick up the first and last row for each Empoylee iD, which are the Start and End time then use a Join tool to bring the data back together.

1029-kapilthakur.png

kapilthakur
7 - Meteor

Thank you @binuacs 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels