Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hey guys,
I'm trying to organize the information, as per the example below, in Power Query, but I'm a little stuck.
How can I do this?
I've tried using Group by, but I don't think that's the correct way to do it.
FROM:
Group Name | Market Name |
Danone | Alcools |
Danone | Pizza |
Danone | Cheese |
Nestle | Alcools |
Nestle | Juice |
TO:
Group Name | Market Name 1 | Market Name 2 | Market Name 3 |
Danone | Alcools | Pizza | Cheese |
Nestle | Alcools | Juice |
Thanks,
Solved! Go to Solution.
Hi @PatrickPerovan ,
Please refer to the following steps, hope it helps:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcknMy89LVdJRcsxJzs/PKVaK1UESDMisqkpEFXLOSE0tTgWL+aUWl+Sg64ULepVmJgPVxQIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Group Name" = _t, #"Market Name" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Group Name", type text}, {"Market Name", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Group Name"}, {{"Market Name", each Text.Combine(List.Distinct([Market Name]),",")}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Grouped Rows", "Market Name", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Market Name.1", "Market Name.2", "Market Name.3"})
in
#"Split Column by Delimiter"
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @PatrickPerovan ,
Please refer to the following steps, hope it helps:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcknMy89LVdJRcsxJzs/PKVaK1UESDMisqkpEFXLOSE0tTgWL+aUWl+Sg64ULepVmJgPVxQIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Group Name" = _t, #"Market Name" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Group Name", type text}, {"Market Name", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Group Name"}, {{"Market Name", each Text.Combine(List.Distinct([Market Name]),",")}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Grouped Rows", "Market Name", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Market Name.1", "Market Name.2", "Market Name.3"})
in
#"Split Column by Delimiter"
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
I found a video with the answer!
If anyone need help in a futher:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
31 | |
31 | |
20 | |
15 | |
12 |
User | Count |
---|---|
20 | |
19 | |
16 | |
10 | |
9 |