We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

alteryx Community

# Alteryx Designer Discussions

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

## Joining two excel column

8 - Asteroid

Hello All,

So in my current task , i am again stuck in a situation. Thought i am finding it difficult to explain. But let me try using a generic case: here i am joining the two based on column "Occupation"

Table 1:

 F_Name L_Name Age Occupation Anna Teo 22 Teacher Diana Koh 23 Doctor Naz Ag 45 Engineer app Ag 45 Engineer

Table 2 :

 Occupation Hobbies Teacher Cooking Teacher Gardening Engineer Cooking Pilot Singing Dancer Drawing Singer Panting

Output:

 F_Name L_Name Age Occupation Hobbies Anna Teo 22 Teacher Cooking Naz Ag 45 Engineer Cooking

So basically in table 1 there are 2 Engineer, while in Table 2 there was just 1 . So i want to match that  for every row in table 1 , is there a corresponding row in table 2 as well. So the count of occurrence should also match in both tables.

Can anyone suggest?

3 REPLIES 3
15 - Aurora

Hi @nazuk,

I am not sure if I got it right, but you basically want to say "check the row number and occupation" and if both are the same in both tables - than match them. You could do this the following way:

Output:

Steps:

1) Add RecordID Tools to both Inputs

2) Join everything together

3) Sort to original order

4) Remove RecordID Column (Select Tool)

Workflow attached. Let me know what you think.

Best

Alex

ACE Emeritus

Hi @nazuk

If you truly are looking for only one match from each table, you could use the "Unique" tool on the Field [Occupation] in each table first.  This will only take the first row for each unique value of [Occupation].  Then join both tables on [Occupation].

8 - Asteroid

Thanks a lot. It is not exactly the scenario. But i got the trick using record id itself to solve the problem.

Using the trick given by you. I ma able to get my desired output!

Labels