The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello Folks, Thanks for the support for a beginer . Need a help with simple task.
I have data like this .
Category | Product |
Fruit | mango |
fruit | banana |
Vegetable | potato |
Vegetable | tomato |
and i want the result like this in table view
Category | Product |
Fruit | mango,banana |
Vegetable | potato,tomato |
how i can achieve this . thanks in advance
Solved! Go to Solution.
@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"
@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"