Alteryx Designer Desktop Discussions

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

How to Transpose and Append Repeating Columns

Dstrickland
5 - Atom

I am currently working with PO data that comes from a vendor with one row per PO and a repeating set of columns for the quantity, part and part price of each item ordered. Currently, the largest PO includes 14 items, so there are 14 columns for each individual category. My goal is to create a workflow that reorganizes the data to have multiple rows per PO and only one column each for quantity, part and part price. Please see the examples below of how we receive the data compared to how I am hoping to display the data:

 

DATA RECEIVED ("BEFORE" tab in attached workbook)

PO #TOTAL BALANCE DUEQTYPARTPART PRICEQTY2PART2PART PRICE2 QTY3PART3PART PRICE3 
P889489$400.001543455432038456468810024564643140
P123438$250.00122108860250      
P457687$1,5002546480542501799894351000   
P098503$50.0010048975160.5      
P934058$375.0015489431375234849846100104897451110

 

END GOAL ("AFTER" tab in attached workbook)

PO #TOTAL BALANCE DUEQTYPARTPART PRICE
P889489$400.0015434554320
P889489$400.00384564688100
P889489$400.0024564643140
P123438$250.00122108860250
P457687$1,500254648054250
P457687$1,5001799894351000
P098503$50.0010048975160.5
P934058$375.0015489431375
P934058$375.00234849846100
P934058$375.00104897451110

 

I have also attached the workflow I have been working with. I am able to achieve half of my goal, but cannot seem to figure out how to compile the item information into one column each for quantity, part and part price. 

 

Thank you in advance for your help!

3 REPLIES 3
BrandonB
Alteryx
Alteryx

You can do this with a few select tools and a union to make the fields consistent, filter out the nulls, and stack the data. Example workflow attached. 

 

 

Stacking.png

BrandonB
Alteryx
Alteryx

And here is a way to do it dynamically so it will perform this process no matter how many columns you throw at it. 

 

Dynamic Stacking.png

Dstrickland
5 - Atom

Perfect! Thank you so much for your help!

Labels