Forum Discussion
Remove duplicates only if the duplicate values contain a certain text
- 5 years ago
Nandor
You will have to do a different approach. I added a conditional column and an Index column and removed the duplicates. Please check the attached file below my signature.
My Sample Data
Output
You could also duplicate the table, name it WRS, and then filter for just the values that end with WRS--then remove duplicates. Then filter out the rows where Names ends with "WRS". Then combine both tables as a new query.
So in your duplicated table, add this in the formula bar:
= Table.Distinct(Table.SelectRows(PriorStepName, each Text.Contains([Names], "WRS")))
Then, in your original table, add this in the formula bar:
Table.SelectRows(PriorStepName, each not Text.Contains([Name], "WRS"))
Then you can combine both tables as a new query with the combine function in the GUI.
--Nate