Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Join by single common field

Alteryxuserhere
8 - Asteroid

Hi All

I have the two following tables:

1.png

2.png

 

How do I just simply join the two tables together so that where the Email matches the top table, it will just return the Type collumn field?

  

6 REPLIES 6
DavidSkaife
13 - Pulsar

Hi @Alteryxuserhere 

 

You're almost there, just untick everything apart from the right input Type field

 

Capture.PNG

 

Note that you have multiple types that are assigned to the same email, so your output total will be more than your input

Alteryxuserhere
8 - Asteroid

Thanks for the reply @DavidSkaife 
Is there a way to keep it so that it only outputs the the same amount of rows in the first table without the duplication?

DavidSkaife
13 - Pulsar

Hi @Alteryxuserhere 

 

there is, however it raises some further questions. You can use the Summarize tool to group by the email addresses, and concatenate the Types so your output will look like this:

 

Capture.PNG

However not every email address from the first table is in the second table, so it depends on how you want to handle that. Usually you'd place a Union tool after the join and union the L and J outputs but as you're not wanting any output other than the right side this would error as there is nothing on the left side coming through. I've attached my workflow so far.

Alteryxuserhere
8 - Asteroid

Thanks @DavidSkaife 

If I place a Union tool after the join and union the L and J outputs then the results would look like this. What would I need to do so that after the join or union it would only show all the orginal data from the first table + the type collumn and for the emails that exist in both tables show the Type field and if the email doesnt exist in table 2 then just return null?

3.PNG

nagakavyasri
12 - Quasar

@Alteryxuserhere  Union by name

 

Capture.PNG

DavidSkaife
13 - Pulsar

Hi @Alteryxuserhere 

 

On the Join tool tick the left side inputs:

 

Capture.PNG

Then your output will look like this; retaining the original 7 records from the left input, the concatenated 'Types', and null for where the email doesn't appear in the second table

 

Capture1.PNG

Labels