Alteryx Designer Desktop Discussions

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

Lookup logic

AlterIT
8 - Asteroid

I am trying to create a lookup logic to load various columns in a table. I have a child table with customer details along with Revenue as a measure. Also customer has a location and I need to fill information related to the location by looking up in the master table. Customer can move from one location to another so Customer state might not be the same in both child and master.

 

I need to fill in missing Revenue details for customer  - This is done by looking up Customer ID in the Master Table.

 

Similarly, I don't have Capital and Population details for some of the States in child table. This need to be filled in by looking up against the Master table by joining the State column alone.

 

There are records in child table which is not present in Master table but they have information available, so those records are ok. In the end I am trying to get all the missing information filled in the child table.

 

I have attached the workflow I am trying and I got Revenue part working and I am looking for options on how can I get the Capital and Population working in the same flow. 

 

AlterIT_0-1676508536021.png

 

 

 

 

9 REPLIES 9
binuacs
20 - Arcturus

@AlterIT Are you looking for something like this or do you want the 205 records of the child table to be replaced with 205 of the master table?

 

binuacs_0-1676532599000.png

 

AlterIT
8 - Asteroid

What I am trying is to fill the missing "Revenue" details in the Child table by looking up the customer ID against Master table. Also Fill the missing "Capital" & "Population" information in the child table by looking up the State against Master Table. In the end desired table will look like this. 

 

You might see one row has blank information for some column (for Customer 501) because 501 is not present in the Master Table to look up.

 

AlterIT_0-1676554624980.png

 

 

 

binuacs
20 - Arcturus

@AlterIT Can you check the attached workflow result? Let me know if that is not working for you 

AlterIT
8 - Asteroid

We need to populate State details with what State the customer is, for e.g.102 & 103 belongs to NY and it should fill in the details of NY by looking up against Master file and so on. 

AlterIT
8 - Asteroid

I have implemented this in 2 passes not sure if there is a better way to do this

binuacs
20 - Arcturus

@AlterIT Can you upload the input file?

binuacs
20 - Arcturus

@AlterIT I tried with my input in your workflow, did not get the expected result, I updated my workflow to reflect child rows priority

 

binuacs_0-1676616881780.png

 

AlterIT
8 - Asteroid

@binuacs Here is the input file I have used

binuacs
20 - Arcturus

@AlterIT Your workflow looks good to me

Labels