Alteryx Designer Desktop Discussions

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

Join 2 table with same colunm name

adarsh2608
8 - Asteroid

Hello ,

I have 2 tables

 

DataitempositionValueposition
Jan-202210A50R
Feb-202220A50R
mar-202220A30G
Apr-202230G10A

 

 

DataitempositionValueposition
Jan-202220A10A
Feb-202230G20A
mar-202210A10A
Apr-202210A10A

 

 

 

 

and merge to one table as below

 

DataitempositionValuepositionitempositionValueposition
Jan-202210A50R20A10A
Feb-202220A50R30G20A
mar-202220A30G10A10A
Apr-202230G10A10A10A
         

 

 

 

merge two table and remaining columns are identical

6 REPLIES 6
FrederikE
13 - Pulsar

Alteryx doesn't allow columns that have the same name, this cann't be avoided, since the column name needs to be an identifier. I don't think that this is possible in any tool, as it creates a logical error. 

 

If you are just talking about the structure a JOIN on data will do the trick. 

ChrisTX
15 - Aurora

Use the Join tool. You can't have two columns with the same name, in the same table.

 

Chris

 

DataNath
17 - Castor

@adarsh2608 by default, you can't have names that are the same, as the others have mentioned. However, if you're really particular on this then there is a 'hacky' workaround whereby you can just add spaces to the end of the field name. In the join configuration I've just renamed these. For example the 4 position fields are now 'position', 'position ', 'position  ' and 'position   ' but appear as normal in the output:

 

DataNath_0-1657542529047.png

Emmanuel_G
13 - Pulsar

Hi @adarsh2608 ,

 

As said before, you cannot have two columns with the same name so Alteryx will add a 2 suffix when a second occurrence of a field name that already exists is present. It will increment step by step with 3,4,5... if more columns are added.

 

For the join, since there are columns with the same name on both tables, it precedes the column names coming from table 2 with a "Right_".

 

Otherwise for the display of several fields with the same name (imagining that this is what you want), you can precede or suffix your column names with spaces.

 

Here is a solution attached which gives the expected result.

 

Let us know if it works.

Emmanuel_G_0-1657544850546.png

 

nlundgren
Alteryx
Alteryx

@adarsh2608 - following the other notes above, some of the following field names could work:

"item" and "item2"

"item" and "item "

"item" and "item_new"

etc.

 

The reason being is because Alteryx performs data functions, formulas, etc. on column names (i.e. "Item") vs. column location (i.e. column B) as excel does. So each column or field of data needs a unique name so Alteryx knows where your data transformation is taking place. 

binuacs
20 - Arcturus

@adarsh2608 one way of getting the same column name after joining the data

binuacs_0-1657547037128.png

 

Labels