Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ashikts
Helper II
Helper II

table view

Hello Folks, Thanks for the support for a beginer . Need a help with simple task.

 

I have data like this .

CategoryProduct
Fruitmango
fruitbanana
Vegetablepotato
Vegetabletomato

 

and i want the result like this in table view 

 

CategoryProduct
Fruitmango,banana
Vegetablepotato,tomato

 

how i can achieve this . thanks in advance 

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

@ashikts ,

 

Try this mcode:

 

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wck4sSU3PL6pU0lEKKMpPKU0uUYrViVZyKyrNLAGK5SbmpeeDRdKgIkmJeUAIFgpLTU8tSUzKSQUKF+SXJJbkYwiX5OeChWMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"(blank)", type text}, {"(blank).1", type text}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Category", type text}, {"Product", type text}}),
    #"Capitalized Each Word" = Table.TransformColumns(#"Changed Type1",{{"Category", Text.Proper, type text}}),
    #"Grouped Rows" = Table.Group(#"Capitalized Each Word", {"Category"}, {{"Rows", each Text.Combine(_[Product], ","), type text}})
in
    #"Grouped Rows"

 

 

 

Capture.PNG

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

2 REPLIES 2
camargos88
Community Champion
Community Champion

@ashikts ,

 

Try this mcode:

 

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wck4sSU3PL6pU0lEKKMpPKU0uUYrViVZyKyrNLAGK5SbmpeeDRdKgIkmJeUAIFgpLTU8tSUzKSQUKF+SXJJbkYwiX5OeChWMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"(blank)", type text}, {"(blank).1", type text}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Category", type text}, {"Product", type text}}),
    #"Capitalized Each Word" = Table.TransformColumns(#"Changed Type1",{{"Category", Text.Proper, type text}}),
    #"Grouped Rows" = Table.Group(#"Capitalized Each Word", {"Category"}, {{"Rows", each Text.Combine(_[Product], ","), type text}})
in
    #"Grouped Rows"

 

 

 

Capture.PNG

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88  thank you so much sir

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.