Forum

Create Duplicate En...
 
Notifications
Clear all

Create Duplicate Entries based on Column Value and change data entries

2 Posts
2 Users
0 Reactions
107 Views
(@deanp)
Posts: 1
New Member
Topic starter
 

I want to add a duplicate of a row in my existing table based on value in another column in the same table using power query:

 

I have a column called 'ITM CODE' in my table.  I want, for every row where the ITM CODE = SLMANFEE, that entire row to be duplicated and placed at the bottom of the existing table.  Then I want the data the the second column of the copied row to be changed to "WMC".

 

Any help would be appreciated

 
Posted : 28/11/2018 8:14 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Dean,

It's tricky without a sample file but hopefully you can follow the attached file.

You can use the List.Numbers function to create a list where the ITM Code = SLMANFEE. You can then expand the list to new rows, which duplicates them. Use Sort on the list values column (Dup Rows in the file attached.) to move the new rows to the bottom of the table. Note: this may mess up the original sort order.

Mynda

 
Posted : 29/11/2018 10:33 pm
Share: