Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Combine multiple rows into one row

Highlighted
5 - Atom
Person_IDVisit_IDDX1DX2DX3DX4

1

11000
110100
110001
110010
121000
23

1

000
230010
340100
451000

 

Hello, I am trying to create a dataset that only has one row per visit id. Currently, my data is structured as above, where each row contains a diagnosis indicator for each visit. What I would like is to have one row for each visit with all the dx. So it would look like this: 

Person_IDVisit_IDDX1DX2DX3DX4
111111
121000
231010
340100
451000

 

I am new to alteryx and not sure what the best way to do this would be? I looked at the multi-row function, but I want to look at more than a constant n row/s above or below. 

 

Thanks

Cait

Highlighted
14 - Magnetar
14 - Magnetar

Hi @cebiddle !

To make it more dynamic, you'll want to do a bit of transposing and summarizing.

image.png

 

Transpose turns the data vertical, and then we can use the summarize tool to find the largest value for each Visit. The crosstab tool turns it back into the table.

Cheers!

Esther

7 - Meteor

 

 

Hi @cibiddle

 

I've achieved the results you seek with a few tools as follows...the Summary tool can be configured accordingly.

 

Jerry

3.png

 

 

 

 

 

1.png2.png

 

Highlighted
13 - Pulsar

Here is the sample workflow for your case. Hope this is helpful. 

 

Combine multiple rows into one row - workflow.PNG

Labels