Alteryx Designer Desktop Discussions

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

Trying to do vlookup in Alteryx

Asad_Ali
5 - Atom

Hi guys!

 

This is my first post on this platform and i am just starting to learn Alteryx so have really basic question.

 

I have two sets of table as shown below and Idea is to find the lookup value in table 2 and bring it in table 1, and incase it is not available in table 2 then take the original value. 

 

I hope the example shown below is easy to understand, I am bit stuck so shall really appreciate quick help.

 

End note:

 

I used the join tool to do this but it only shows values for those that are available in table 2 everything else is ommited.

2.png 

10 REPLIES 10
grazitti_sapna
17 - Castor

Hi @Asad_Ali , the data is actually not omitted as you see in join tool we have 3 options left, join and right the matched records will be shown in join and rest in left and right outer join.

grazitti_sapna_0-1603793889848.png

 

If you want to get all the records as in both the tables you can use union tool which will display records from both the tables giving null values for those columns that are were not joined.

Please refer to the image and workflow attached along.

grazitti_sapna_1-1603793991301.png

 

I hope this helps, please mark this post as solution if it is useful for you.

 

Thanks.

 

 

Sapna Gupta
atcodedog05
22 - Nova
22 - Nova

Hi @Asad_Ali 

 

Here is a workflow for the task.

 

Output:

atcodedog05_0-1603794076040.png

Workflow:

atcodedog05_1-1603794090159.png

 

Way - 1 : use Join tool and union to get Left outer join

Way - 2 : Uses Join multiple which is default set on outer join. (preferable based on scenario)

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Qiu
20 - Arcturus
20 - Arcturus
Qiu
20 - Arcturus
20 - Arcturus

@grazitti_sapna  @Asad_Ali 
Come on guys. you are so fast!

Emil_Kos
17 - Castor
17 - Castor

Hi @Asad_Ali,

 

Join is the right tool to use.

 

Afterwards you need to merge together union to add what has been joined and what hasn't been joined.

 

Afterwards you need to create a formula that will check if new column is null if it will be null you need to replace it with the Master ID.

 

I think you would need to use this formula in order to make it work: 

 

IIF(Isnull([Master ID_2]),[Master ID_1],[Master ID_2])

grazitti_sapna
17 - Castor

@Asad_Ali , in addition to the above post of mine here is the direct solution to your problem I just wanted you to understand the concept and try yourself.

 

I could think of 2 methods one is join and other is find and replace. You can choose any which satisfies your requirement.

 

grazitti_sapna_0-1603794591584.png

 

Thanks.

 

Sapna Gupta
grazitti_sapna
17 - Castor

@Qiu  🤣, you are fast too.

Sapna Gupta
Asad_Ali
5 - Atom

Thank you so much for this help

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @Asad_Ali 

 

Cheers and Happy Analyzing 😀

Labels