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

Add data from one file below each data point in another

Number4
8 - Asteroid

Not sure how to describe this.

Say I have one file that contains a list of stores.

Another file that contains product.


I need to combine the two, so that the product duplicates below each of the stores.

With the store being it's own row.

 

So it's like a cross between a Union and Append tool.

 

Store  - Input 1

Store1_NAME

Store2_NAME

Store3_NAME

Store4_NAME

 

Product - Input 2 (this is already a CSV file)

123*Orange*16

234*Blue*02

345*Red*32

 

Would look like this:

Store1_NAME

123*Orange*16

234*Blue*02

345*Red*32

Store2_NAME

123*Orange*16

234*Blue*02

345*Red*32

Store3_NAME

123*Orange*16

234*Blue*02

345*Red*32

Store4_NAME

123*Orange*16

234*Blue*02

345*Red*32

5 REPLIES 5
Luke_C
17 - Castor

Hi @Number4 

 

I made a quick batch macro that unions the products to each store. I'm curious to see other approaches, this might be overkill but to me is the simplest answer. 

 

Luke_C_0-1620237416608.png

 

Luke_C_1-1620237431422.png

 

 

 

 

mceleavey
17 - Castor
17 - Castor

Hi @Number4 ,

 

I've built a little macro to do this for you:

 

mceleavey_0-1620238066397.png

 

This takes the Store as a control parameter and loops through, applying the Products to each store. Careful to sum in case there are any repeated store values.

 

M.



Bulien

Number4
8 - Asteroid

Thanks @Luke_C! Worked great.

Number4
8 - Asteroid

Thanks @mceleavey it looks like both responses derived the same result.

mceleavey
17 - Castor
17 - Castor

no problem.gif



Bulien

Labels