Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Creating rows from existing columns

dianastate
6 - Meteoroid

Hi!

 

I have I have a file to clean up and it has multiple columns: Product Code, Linked Product Codes, Style Number etc.

Both the Product Code and Linked Product Code refers to the same style, they have the same attributes ( all the other columns following those columns are exactly the same). 
I want to paste all the Linked Product Codes as separate rows ( the linked product codes to become product codes on their one), and to be followed by the same attributes ( columns) as before.

I have made an excel with the workaround ( see table 2).
Any ideas how it can be done?

 

Thanks!

3 REPLIES 3
SPetrie
13 - Pulsar

If I understand this right, I think a select and a union tool are all you need.

Use the select to remove the product column and rename the linked column and then union that back in.

 

SPetrie_3-1680805155719.png

SPetrie_4-1680805185124.png

 

 

SPetrie_2-1680805092021.png

 

 

 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

If you don't need the old column ("Linked Product Code") any more, Transpose tools may come in handy.

Input

Yoshiro_Fujimori_1-1680826029136.png

 

Workflow

Yoshiro_Fujimori_0-1680825979227.png

 

Transpose Tool Configuration

Yoshiro_Fujimori_3-1680826074214.png

 

Output

Yoshiro_Fujimori_2-1680826042833.png

 

SeanAdams
17 - Castor
17 - Castor

There's a few other options:
- filter product & linked products (using a select tool)  - and then union them into one data set - and then look for distinct by using the unique tool.

- you may be able to use the Arrange tool - this is one that doesn't get as much love as you'd expect - it's under Transpose

 

 

Labels
Top Solution Authors