Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Lookup Table - Lookup function with multiple criteria

avavalley
7 - Meteor

 Hi all,

 

I am trying to create a lookup table and then use it as a reference sheet to populate two columns based on multiple criteria in the reference sheet all matching exactly what is in the row of the data table. I have attached a file that explains this a little more clearly.

 

If anyone knows of a simple way to so this it would be greatly appreciated, thanks!

5 REPLIES 5
LukeG
Alteryx Alumni (Retired)

Hi @avavalley 

 

It sounds like the Join tool will work in this situation.

 

Use the two tables as two different inputs. One streaming into the 'L' input anchor, and one streaming into the 'R' input anchor.

 

Then, select the fields to join on. (Unit, Co Code, Link) Should look something like the picture below.

 

LukeG_0-1573136212669.png

 

Let me know if this is helpful, and please ask any questions you may have!

 

Luke

avavalley
7 - Meteor

The join tool seems to be putting the reference field in order ie. center, center, center, affiliate, affiliate, affiliate instead of leaving the original order and inserting the matching field.

LukeG
Alteryx Alumni (Retired)

By default, the Join tool will place all of the fields from the 'Left' table at the beginning and the fields from the 'Right' table will follow. You have the option in the configuration window to select, deselect, reorder, and rename the fields that are included in the output. (As well as change data types)

 

So, you should have the ability to make the output look just right. If I misunderstood the question, it might be helpful to upload your workflow and I can take a look.

 

Let me know if you have questions. Thanks!

Luke

avavalley
7 - Meteor

I just needed a sort tool after.  Thanks!

LukeG
Alteryx Alumni (Retired)

Excellent! Nice job

Labels