Hi I am trying to stack multiple columns of a data set in Alteryx. I will show my data below.
Group 1 | Score 1 | Group 2 | Score 2 |
A | 1 | E | 5 |
B | 2 | F | 6 |
C | 3 | G | 7 |
D | 4 | H | 8 |
I want it to look like the following:
x | y |
A | 1 |
B | 2 |
C | 3 |
D | 4 |
E | 5 |
F | 6 |
G | 7 |
H | 8 |
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?
解決済! 解決策の投稿を見る。
Hi @jaipersr ,
I'm not sure if I'm oversimplifying, but I'm attaching my solution.
Best,
Fernando Vizcaino
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.
Hi! This is more of what I was looking for. Thank you for the help.
Hi, Can you explain what ceil([RecordID]/2) is doing here? Thanks
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.