Alteryx Designer Desktop Discussions

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

Vlookup - one value to lookup for two columns to return - only inner join returned

Baz123
8 - Asteroid

Hi,

 

I have been trying to resolve a VLOOKUP problem. In excel I have two files, that both have a common field of PO Number.

 

Usually the main data set has NULL in the purchaser name and location. I use the second reference file to lookup the PO and on each column perform a VLOOKUP to return the name, and the another lookup to return the location.

 

Data set (main file): 

 

SupplierPurchaserPO NumberLocation
ANULL20714NULL
ABob S21677BBBB
BNULL21655NULL
BNULL21655NULL
CMary Y21341EEEE

 

Reference file:

 

SupplierPurchaserPO NumberLocation
AJim K20714AAAA
BSam K21655CCCC
BSam K21655CCCC

 

Required output:

 

SupplierPurchaserPO NumberLocation
AJim K20714AAAA
ABob S21677BBBB
BSam K21655CCCC
BSam K21655CCCC
CMary Y21341EEEE

 

In the real data sets I am using a join tool with the main data going in the left (166 rows), the reference table going in the right (1094 rows). 

 

Join tool is configured so that they are joined on PO Number. The main columns (left) are all selected - except the two in question: Purchaser and Location. The right reference has all deselected except for Purchaser and Location.

 

My issue is all I am getting 1660 in the inner join return???

 

All I want is the left join to return the required output with 166 rows.

 

What am I doing wrong? Should I be using the Find replace tool instead?

 

Thanks.

 

3 REPLIES 3
FilipR
11 - Bolide

Here's one way of doing this.

 

FilipR_0-1663308531685.png

 

binuacs
21 - Polaris

@Baz123 Make sure your reference file has no duplicated records which are giving you the unexpected result

 

binuacs_0-1663308832991.png

 

Baz123
8 - Asteroid

Thanks @binuacs - it was duplicates causing errors in the reference file.

 

Once I added the unique tool as you had it, then it worked.

 

:)

Labels
Top Solution Authors