November 28, 2018
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
July 16, 2010
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.