Alteryx Designer Desktop Discussions

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

Cross Tab Concatenate Help Needed

kubikbr
6 - Meteoroid

Looking for some assistance from the community on a cross tab and concatenate. Table below is my original source data. It consists of a long list of patients and each has a corresponding TOS code. As you will see some patients have multiple codes. Looking to concatenate these unique codes all into one column that can then be joined to my dataset, which is the 2nd image below. Workbook attached if its helpful. 

 

Original data:

Patient IDTOS
Patient 198
Patient 294
Patient 295
Patient 396
Patient 395
Patient 393
Patient 392
Patient 492
Patient 495

Desired Outcome:

 
Patient IDTOS
Patient 198
Patient 294, 95
Patient 396, 95, 93, 92
Patient 492, 95, 96, 97
3 REPLIES 3
ShankerV
17 - Castor

Hi @kubikbr 

 

The summarize tool will help for this use case.

 

Screenshot 2024-05-01 195606.png

Step 1: 

 

1 photo.png

 

Step 2:

2 photo.png

 

alexnajm
17 - Castor
17 - Castor

Summarize tool is your option here!

 

Edit: workflow included, and same idea @ShankerV !

apathetichell
19 - Altair

If you have a restriction on using summarize tool because of "stuff" - you could use a crosstab. You'd have to a) convert your TOS field to string b) use a formula tool to create  a new column (let's call it new_column_header) and give it a value of "TOS" 3) Cross tab (with Patient ID as key, new_column_header as column name and TOS as value. set mode to concatenate.

Labels