Alteryx Designer Desktop Discussions

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

Put 2 datasets next to eachother.

The1804
7 - Meteor

Hi,

 

I'm looking for a simple solution to put 2 data sets next to eachother but without generating all possible combinations. Unfortunately I wasn't able to find anything in existing topics.

 

Here are the inputs:

 

KeyValue1
Key112
Key2543
Key2765
Key2987

 

KeyValue2
Key132
Key112
Key1321
Key2765
Key2876

 

And expected output:

 

KeyValue1Value2
Key11232
Key1 12
Key1 321
Key2543765
Key2765876
Key2987 

 

All help is appreciated!

5 REPLIES 5
Emil_Kos
17 - Castor
17 - Castor

Hi,

 

Join tool is the perfect tool to achieve it. You need to pick the option join by record position. 

 

Emil_Kos_0-1622538131355.png

 

mceleavey
17 - Castor
17 - Castor

Hi @The1804,

 

we're lacking a bit of information here as the join logic is not consistent.

As @Emil_Kos points out, you can join by position which will give you all records from the first dataset with any corresponding sets in the same record potion, but does not account for those records which are joined.

 

Can you confirm the join logic between the two, as the first dataset seems to retain the order of the Key2 value, but not the key1 value, which is taken from the second dataset.

 

M.



Bulien

The1804
7 - Meteor

Hi @Emil_Kos

 

Maybe I wasn't clear enough. I still need to join by Key value but I just need to list all values from both sources next to eachother.

Joining by record position would only work if the amount of values per key would always be the same in both sets.

 

The1804_0-1622538668709.png

 

 

I hope you understand what I mean.

 

mceleavey
17 - Castor
17 - Castor

@The1804 ,

 

Given what I went over previously, the following workflow isolates the key value in each dataset, uses the join by record position method, and unions back together:

 

mceleavey_0-1622538932307.pngmceleavey_1-1622538949559.png

 

But this method needs the logic to be determined for it to be consistent.

 

M.

 



Bulien

AngelosPachis
16 - Nebula

Hey @The1804 ,

 

Based on your input, you want to join on key ID and a new field that you have to create (I named it ID) which numbers the number of records for each ID.

 

AngelosPachis_0-1622539135121.png

 

 

 

Then you can use a join or join multiple to bring everything together.

 

Hope that helps.

 

Angelos

Labels
Top Solution Authors