Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to place multiple columns under one column

danielsnook
5 - Atom

Hi all, does anyone know how to go about placing a specific column under another column? For example placing column D under column B while still keeping the first two columns consistent.

 

Before

NumberNameAB
1John                            1                         48
9Barb                          43                         27
1000Willy                          60                         42
1001Steve                          98                         94

 

After

NumberNameA
1John                            1
2Barb                          43
3Willy                          60
4Steve                          98
NumberNameB
1John                          48
2Barb                          27
3Willy                          42
4Steve                          94

 

Thanks

7 REPLIES 7
kat
12 - Quasar

Hi @danielsnook

 

Have a play with the transpose tool. I think you'll struggle with those repeating field names, but it might be what you need.

 

Cheers

Kat

ddiesel
13 - Pulsar
13 - Pulsar

Hi @danielsnook!

 

Try this setup and see if it works for you. In your Input Data tool, make sure to check the box in setting #6 for "First Row Contains Data" as the field names are treated as records to match your desired output.

 

Capture.PNG

ThizViz
11 - Bolide

I'll toss out another possibility, but it will depend on how many columns you have.

 

First, in your input tool, check the "first row contains data" box.

 

Use a select tool to pick only Number, Name and A, but change the name of A from F3 to Value

 

Copy and paste that select tool (connect to your input) and change your selection to Number, Name and B. Again, rename column "B" (F4 or whatever) to Value.

 

Continue until you have all your columns, then union all.

 

Now your data is arranged as you've described and you can rename your column headers any way you want.

 

 

It appears that your data is structured according to some pre-defined report, but just in case you ever want to use it in Tableau, for instance, there's a better way. I'll whip up an example for you.

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
ThizViz
11 - Bolide

Here's a little bit different way to prepare the data in case you need to present it in another tool.

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
ThizViz
11 - Bolide

Here's a little bit different way to prepare the data in case you need to present it in another tool.

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
danielsnook
5 - Atom

Thanks this worked out great! The transpose tool was giving me a little bit of trouble before, much appreciated.

ddiesel
13 - Pulsar
13 - Pulsar

Glad it worked out for you!

Labels