Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Help... Want single column derive from mutiple tables joins

snand2
5 - Atom

Hi All,

 

Can someone provide a workflow for below request;

 

I have 4 tables.

Table A(Master table)

Table B

Table C

Table D.

 

I want all the records from table A(Emp_ID) and mapped with the records from other tables. I have designed the workflow, but the hurdle is, some of the emp_id are present in table B and table C. So, when I join the table B and table C with table D, alteryx shows same columns of table D twice.

 

Sample files are attached.

 

Current result 

snand2_1-1686181978426.png

 

 

 

I need desired result as below

 

snand2_0-1686181896294.png

 

 

 

 

2 REPLIES 2
Miles_Waller
8 - Asteroid

Full result is below

 

Miles_Waller_0-1686184467542.png

 

Basically the first thing I did was to look at all the data.Tables B and C looked like they had the same kind of data (EMP_ID to PRODUCT_ID Mapping) so I just unioned them together.

 

Miles_Waller_1-1686184661567.png

 

 

Next I joined that union output with the Table_D input which has product information, by PRODUCT_ID (unchecked the duplicate Right Product_ID field). However, the J output will only contain data for products mapped to an employee which exist in that product information table. Products that are NOT in that table will say in the L output anchor, so I just joined unioned the L and J outputs together.

 

Miles_Waller_2-1686184678528.png

 

 

Technically based on your data that is the final answer - but I went ahead and did the remaining steps in case you had employees in Table A which were not mapped to a product in the other tables. That's what the next join is for, by EMP_ID, and I deselected the duplicate EMP_ID field. Then same as earlier, you union the L and J together to get the final answer.

 

Miles_Waller_3-1686184846402.png

 

snand2
5 - Atom

@Miles_Waller

 

Thanks for working out.

Labels