We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Assistance with the JOIN tool

itssumanb
8 - Asteroid

Hi friends, 

I have two simple excel files (unable to share due to confidential data) each with 700 (File 1 ) and 664 (File 2) records/rows. File 2 has two additional fields than File 1.  Basically, I am trying to do a Vlook up from file 2 to pull those two fields into File 1. I am using the Join tool. When I  Join by Record Position and Union the J and L output , the total output records count I am expecting is correct but some of the data positionings do not align correctly. However, when I use the Join by Specific Fields (both files have a common field), my J output itself is 20,297 records. I am wondering what is causing this increase when joining my specific fields. Any kind of ideas/help is so appreciated. 

 

Thanks

Suman

5 REPLIES 5
BrandonB
Alteryx
Alteryx

This is because a traditional vlookup just finds the first instance of a match and then links up the corresponding data while a Join will return all matches found. The "duplicates" are just multiple rows matching from each data set. You will either want to dedupe your second dataset maybe using a unique tool, or you can use the Find Replace tool (also in the join category) as an alternative and use the option at the bottom to "Append Fields to Record" for the columns that you want. The Find Replace tool works more like your traditional definition of a vlookup in a situation like this. 

Emil_Kos
17 - Castor
17 - Castor

Hi @itssumanb,

 

If I understand you correctly you are creating duplicates. 

The file that you are using has duplicates on the fields that you are joining. Look at the example below if you would join those two columns together the final output would have more rows because the identifier isn't unique.

Identifier L First tableIdentifier R Second table
11
11
12
22

 

Is that makes sense?

If this was helpful please mark my post as a solution!

Good luck!

 

 

itssumanb
8 - Asteroid

Hi  @Emil_Kos 

You are right. My identifier isn't unique. So below is an example of what the table looks like and the end output I am looking for. Can you help?

 

Table 1

NumDate

1

1/1/2020
12/1/2020
13/1/2020
212/1/2019
21/1/2020

 

Table 2 (the Notes is unique for each Num)

NumNotes
1abcd
1abcd
2xyz
2xyz
2xyz

 

Expected output table (everything from Table 1 with matching 'Notes' from Table 2)

 

NumDateNotes
11/1/2020abcd
12/1/2020abcd
13/1/2020abcd
212/1/2019xyz
21/1/2020xyz

 

Tyro_abc
11 - Bolide

Hi @itssumanb 

 

Check the attached workflow, most likely you want this. Please let us know otherwise. 

 

arundhuti726_0-1607738282327.png

 

Regards

Arundhuti

Emil_Kos
17 - Castor
17 - Castor

Hi @itssumanb,

 

I believe @Tyro_abc provided you with good working solution.

Please keep in mind it is very important to pay attention if you are creating duplicates using join tool as this might cause many data errors.

 

What I usually do is to observe amount of lines pre join and after join. If they don't match I know something is incorrect.

Quite often you don't need any additional tools to achieve this result you can just check the row count that is visible in the results window.

 

Emil_Kos_1-1607852746087.png

 

Labels
Top Solution Authors