Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Combine and multi-rows into columns

tkaufman
6 - Meteoroid

Hello,

 

I am trying to take the matching data from multiple rows and put the unique information onto separate columns. I am working with timecard punches.  Each time punch in a day is listed on a separate row.  I'd like 1 row for the entire day for that employee.  Below is a small example of how it's currently formatted versus how I want it to be formatted

 

EMP #NAMEDATEPUNCH TYPETIME
123JOHN SMITH11/1/23ON7:05:00
123JOHN SMITH11/1/23OFF12:00:00
123JOHN SMITH11/1/23ON12:30:00
123JOHN SMITH11/1/23OFF16:00:00
123JOHN SMITH11/2/23ON8:00:00
123JOHN SMITH11/2/23OFF11:30:00
123JOHN SMITH11/2/23ON12:00:00
123JOHN SMITH11/2/23OFF16:00:00
124JANE DOE11/1/23ON7:00:00
124JANE DOE11/1/23OFF11:00:00
124JANE DOE11/1/23ON11:30:00
124JANE DOE11/1/23OFF3:30:00
124JANE DOE11/2/23ON9:00:00
124JANE DOE11/2/23OFF13:00:00
124JANE DOE11/2/23ON13:30:00
124JANE DOE11/2/23OFF18:00:00

 

 

How I want it to be formatted:

 

EMP #NAMEDATEPUNCH 1PUNCH 2PUNCH 3PUNCH 4
123JOHN SMITH11/1/237:05:0012:00:0012:30:0016:00:00
123JOHN SMITH11/2/238:00:0011:30:0012:00:0016:00:00
124JANE DOE11/1/237:00:0011:00:0011:30:003:30:00
124JANE DOE11/2/239:00:0013:00:0013:30:0018:00:00

 

Any help would be greatly appreciated!

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @tkaufman you can use a Multi-Row tool to create a rank column that you can pivot into a horizontal format. I mocked up approach which showcases one way to achieve this.

 

Multi_Row_18112023.JPG

tkaufman
6 - Meteoroid

This worked like a charm!  Thank you SO much for the easy to understand steps! 

 

Tamara

Labels
Top Solution Authors