Alteryx Designer Desktop Discussions

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

Adding a row for each match between 2 tables

AlexP
5 - Atom

Hi Alteryx community!

 

I am new to Alteryx and I just hit my first road block.

 

I am working with a dataset that contains parent and child SKUs, which means that everytime I sale a parent SKU, my inventory reduction is in fact attached to each child SKU­.

 

I am trying to add a row to my sales dataset for every child SKU.

 

For example:

 

Dataset

Parent SKUSales
A10
B15
C20
D5

 

 

Parent SKUComponent
AA1
AA2
BB1
DD1
DD2
DD3
DD4

 

I would like to add a row to my first table for each component. However, sometimes there is no component and the parent SKU is not even in the second table. In that situation, I would define the Parent SKU as Child SKU. For the example above, the combinaison of both tables should be the following:

 

Final Table

Parent SKUComponentSales
AA1

10

AA210
BB115
CC20
DD15
DD25
DD35
DD45

 

Is it something we can do in Alteryx or do I have to do it in Excel?

Thanks,

Alex20

2 REPLIES 2
echuong1
Alteryx Alumni (Retired)

This can be achieved with a join tool! See attached for an example.

 

echuong1_0-1582228684459.png

 

AlexP
5 - Atom

Hi echuong1,

 

You're right, it works, except for the Parent SKUs who don't have Component equivalent - Product C in my example.

 

I guess I can use the Union tool to combine the first extract (L) and the second (J). I would need a select tool between the join tool and the union tool to rename my "Component" column into "SKU" and remove the "Parent SKU" column in order to have 2 columns in each table...

 

Thank you for your help!

Alex

Labels