We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Duplicate rows with a change only in 4 columns

nataliad18
8 - Asteroid

Hi!

I have a current dataset, which needs to be duplicated. I need the original fields to also stay, and then in the duplicated versions I need a change in four columns  by four numbers. (i need the original rows, where the number currently is zero, then the same data set with a number in three of the columns stay still 0 but in the last one go to 1, then by 5 and then 10... I also need this to be mixed around, i.e the first column is 1 the other is 0 and the third is 5... basically A LOT of duplicaitons). Is there a way to do that? I have been playing around with generate rows tool, but I can only add one at the time and if when I add it the second time, the in also duplicates it more than once. I am just confused. 

Thank you!

Nat

 

EDIT: I apologise, I added dummy data in the excel file.

the goal is for the last four columns that start with "param" to range between -10,-5,-1,0,1,5, 10. 

So i want to keep all the data with all the zeroes, but also all the data to be duplicated and have a version for each one of the numbers above.

6 REPLIES 6
OllieClarke
15 - Aurora
15 - Aurora

Hi @nataliad18 

Could you please give us some dummy data (input and desired output) to help us help you with your question?

 

Thanks

 

Ollie

nataliad18
8 - Asteroid

I apologise, I have added the data above now. Thanks for pointing it out to me!

atcodedog05
22 - Nova
22 - Nova

Hi @nataliad18 

 

Got it you want to create combinations. You can create them using append tool to do a permutation of 5 values in 4 columns.

 

Workflow:

atcodedog05_0-1631103411730.png

 

Please check and let me know does this work for you.

 

Hope this helps : )

 

AngelosPachis
16 - Nebula

Hi @nataliad18 ,

 

I used a generate rows tool to create new records for each duplicate column and then a look up table to assign the new values between -10 to 10to the new columns

AngelosPachis_0-1631105631193.png

 

If you need more columns to be generated, you can increase the value in the generate rows tool and include that into the lookup table

 

EDIT : Looking at @atcodedog05 output and after re-reading the post, I'm a bit confused about what the desired output should be. @nataliad18  Maybe you can provide one, like @OllieClarke suggested ?

nataliad18
8 - Asteroid

@atcodedog05 this worked PERFECTLY! Thank you so much!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @nataliad18 

If the response helps please don't forget to mark it as solution.

Cheers and have a nice day!

Labels
Top Solution Authors