How to iterate unique values ​​and insert rows

Copper Contributor

Hi everyone,

 

I have a huge dataset with information about different product id's. One of the columns has information about allergens and I want to add four new allergen values (Paranøtter, pekannøtter, pistajsnøtter, valnøtter) for each unique product id. So I need to add four new rows where the Allergens column will have those four new values but the remaining columns can have the same value as those above. 

Finally, I want to sort the allergen column so that all values ​​with nuts (nøtter) come in the end. That means the value peanøtter (peanuts) should be moved to the bottom of the list. 

 

I have tried to do this manually but it takes too much time so I want an automatic way to this by example power query. I haven't used power query before but if there is any way of doing this in an automatic way, then I would really appreciate the help. 

 

In the attachment, I  have recorded a demo of how Im doing it today.

 

 

0 Replies