Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 the Client and Department values on a single row.
That works, except that I get combination of the same values for the respective fields.
How can I get only unique values for each column?
i.e. for Invoice 1, I want Used; A,F and for Invoice 5 I want Used,Repair; E.
Thank you.
Solved! Go to Solution.
@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.
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}})
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}})
@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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
101 | |
39 | |
31 |