Alteryx Designer Desktop Discussions

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

Joining Data in 2 worksheets with same column names

AashimaS
5 - Atom
I have 2 excel worksheets as inputs I am trying to join on same key element. These two have exactly same number of rows and same column headers. I need to compare the values of each column for both data inputs. For this I need the same columns to be placed next to each other. for example, the 2 sheets have columns as field1, field2, field3.. field 100. and workbook 2 has same fields field1, field2, field3.. field 100. i need my output to have columns as field1, field1_right, field2, field2_right, field3, field3_right... and so on.
3 REPLIES 3
NickSm
Alteryx
Alteryx

@AashimaS 

 

Sounds like you'd just want to use a Join tool and select to join by record position, but could also join by common ID. You can then rearrange the field order down below.

 

clipboard_image_0.png

AashimaS
5 - Atom
on a common id. there are 115 columns. by default the join output, gives in 115 records from the first excel and appending the columns from the second excel as right_column nam. so the output has 230 columns, which is correct. But I need the positioning of columns to be next to each for each same column name. col1,right_col2, col2, right_col 2.. etc.
NickSm
Alteryx
Alteryx

@AashimaS 

 

There's a couple ways you could do it.  Most basically you can select a field in the join tool and use the up/down arrows to rearrange, but that's a lot of fields to work with.

 

There's a Sort Fields that has been created which you can download and plug in and sorts fields into alphabetical order - which would get your fields next to each other, but the overall order may change:  http://www.chaosreignswithin.com/2014/09/blog-macro-pack-2014-q3-release.html

 

 

Can reference this post as well: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-do-I-automatically-Order-Columns/t...

 

 

Labels