Alteryx Designer Desktop Discussions

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

Duplicate row

sebastiank88
6 - Meteoroid

Hello,

 

Let's say I have 3 columns with different data. What I would like to achieve is to duplicate row number 1 but taking only data which is highlighted green so TEST 1. Is it possible to do that? If yes can anyone of you propose me a solution?.

 

PS. What if there will be more columns?,  solution will be the same or different? 

 

 

duplicate row.JPG

 

Best Regards,

Sebastian

6 REPLIES 6
DavidSkaife
14 - Magnetar

Hi @sebastiank88 

 

Here is one way of doing it. Use a Sample tool to ensure only the first row is used, then a Dynamic Select tool to pick just the first column, then Union it back to the original data:

 

Capture.PNG

 

Number of columns, nor name of columns, won't matter!

OTrieger
13 - Pulsar

@sebastiank88 
You can use Generate Rows and then with Multi-Row Formula tool delete the content of the from the fields. This is a bit more robust solution as you could do it for multiple rows, as many as needed. However if you need to add only one row go with the above solution as it is super simple. 

sebastiank88
6 - Meteoroid

Hi David

 

Ok, sounds really good.

 

Have another question what if I would like to duplicate only  Test 1 from column A and Test 3 from Column C (from your example above). What will be solution for that?

DavidSkaife
14 - Magnetar

Simply update the Formula in the Dynamic Select to [FieldNumber] IN (1,3)

 

Capture.PNG

sebastiank88
6 - Meteoroid

Perfect, thank you!

DavidSkaife
14 - Magnetar

You're welcome!

 

If you need to add in more columns, simply update the IN formula to include those you need

Labels
Top Solution Authors