Forum Discussion
huguest
6 years agoAdvocate II
Remove replicated values in a grouped column
Hello, I have some data on various invoices with a department and client column. Some invoices can apply to either multiple clients or multiple departments. I use Group By a to concatenate t...
- 6 years ago
huguest ,
Try code below:
Result = Table.Group(#"Changed Type", {"Invoice"}, {{"Department Concatenated", each Text.Combine(List.Distinct([Department]), ","), type text}, {"Client Concatenated", each Text.Combine(List.Distinct([Client]), ","), type text}})Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 6 years ago
Hi huguest
Just add List. Distinct before Text.Combine
= Table.Group(#"Changed Type", {"Invoice"}, {{"Department", each Text.Combine( List.Distinct([Department]), ", " ), type text}, {"Client", each Text.Combine( List.Distinct([Client]), ", "), type text}})Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
Mariusz
6 years agoCommunity Champion
Hi huguest
Just add List. Distinct before Text.Combine
= Table.Group(#"Changed Type", {"Invoice"}, {{"Department", each Text.Combine( List.Distinct([Department]), ", " ), type text}, {"Client", each Text.Combine( List.Distinct([Client]), ", "), type text}})
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.

Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.