Alteryx Designer Desktop Discussions

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

How to stack multiple columns within a data set?

jaipersr
7 - Meteor

Hi I am trying to stack multiple columns of a data set in Alteryx. I will show my data below.

Group 1Score 1Group 2Score 2

A

1E5
B2F6
C3G7
D4H8

 

I want it to look like the following:

xy
A1
B2
C3
D4
E5
F6
G7
H8

 

However, this is not a simple transform tool operation. I need to pivot both my Group columns as well as Score columns and I need the relationship to be one to one. I figured out how to do this using 2 Transform tools. One with respect to only the Group columns and one with respect to only the Score columns. And then joining by record position later on but my question is how to do this in one step? Is it possible or is the way I just described the best possible solution?

6 REPLIES 6
fmvizcaino
17 - Castor
17 - Castor

Hi @jaipersr ,

 

I'm not sure if I'm oversimplifying, but I'm attaching my solution.

fmvizcaino_0-1585671357811.png

 

 

 

Best,

Fernando Vizcaino

jaipersr
7 - Meteor

Hi your solution is valid. However, I actually have a Group 3, Score 3, Group 4, Score 4, Group 5, Score 5 and so forth number of columns. And so I want to solve this for any number of columns rather than my 4 column case.

fmvizcaino
17 - Castor
17 - Castor

Hi @jaipersr ,

 

Example attached. See if this works for you.

Best,

Fernando Vizcaino

jaipersr
7 - Meteor

Hi! This is more of what I was looking for. Thank you for the help.

yogi_789
5 - Atom

Hi, Can you explain what ceil([RecordID]/2) is doing here? Thanks

jessarthur
7 - Meteor

It is essentially updating the Record ID field to increment by 2 instead of 1. In doing so, you can keep track of which two records need to stick together when pivoting.

Labels