Duplicate rows with a change only in 4 columns
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @nataliad18
Could you please give us some dummy data (input and desired output) to help us help you with your question?
Thanks
Ollie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I apologise, I have added the data above now. Thanks for pointing it out to me!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
Please check and let me know does this work for you.
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@atcodedog05 this worked PERFECTLY! Thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Happy to help : ) @nataliad18
If the response helps please don't forget to mark it as solution.
Cheers and have a nice day!