Forum Discussion
102938
Jul 29, 2022Copper Contributor
Remove duplicate words in a cell after power query grouping and aggregating from a table
Hello, I am using a power query to group and aggregate columns of a table. After the power query, the aggregated columns contain duplicate values. For example one of the aggregated columns is ISO...
- Jul 29, 2022
As variant you may aggregate ISO as sum, that will return an error, in formula bar will be something like this
Change in formula bar on that
Other words instead of List.Sum first List.Distinct to remove duplicates, on the top Text.Combine to have one string.
With that doesn't matter how many aggregations you have, you correct only specific one.
SergeiBaklan
Jul 29, 2022MVP
As variant you may aggregate ISO as sum, that will return an error, in formula bar will be something like this
Change in formula bar on that
Other words instead of List.Sum first List.Distinct to remove duplicates, on the top Text.Combine to have one string.
With that doesn't matter how many aggregations you have, you correct only specific one.
- 102938Jul 29, 2022Copper Contributor
SergeiBaklan this worked perfectly, thanks!
As a follow up question, is it possible to add a step to the power query to re-order the ISO codes alphabetically in each cell?
- OliverScheurichJul 29, 2022Gold Contributor
- 102938Aug 03, 2022Copper Contributor
OliverScheurich thank you! This also worked perfectly!