Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi folks,
Hope you are well. I am trying to group and transpose data as below. Can you let me know if there is a way to acheive this?
Actual table:
Customer | Item Bought |
AAA | Car |
AAA | Bike |
AAA | Cycle |
BBB | Car |
CCC | Car |
CCC | Bike |
Desired Output:
Customer | Item Bought |
AAA | Car,Bike,Cycle |
BBB | Car |
CCC | Car,Bike |
Thanks for your time and help.
Solved! Go to Solution.
@Anonymous Create below Measure
Measure = CONCATENATEX('Table','Table'[Item Bought],",")
or
Another way in power query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnR0VNJRck4sUorVgfGcMrNTkbjOlck5EL6TkxOSYmdnZwweRGssAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Customer = _t, #"Item Bought" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer", type text}, {"Item Bought", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Customer"}, {{"Items", each Text.Combine([Item Bought],","), type nullable text}})
in
#"Grouped Rows"
@Anonymous Create below Measure
Measure = CONCATENATEX('Table','Table'[Item Bought],",")
or
Another way in power query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnR0VNJRck4sUorVgfGcMrNTkbjOlck5EL6TkxOSYmdnZwweRGssAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Customer = _t, #"Item Bought" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer", type text}, {"Item Bought", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Customer"}, {{"Items", each Text.Combine([Item Bought],","), type nullable text}})
in
#"Grouped Rows"
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |