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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
raj777karthik
Microsoft Employee
Microsoft Employee

To combine multiple rows of id into single cell

In Power query i have an ID whose description is very long and so it is taking as three records for single id.I need to bring them as single row with all its description .

= Table.Group(#"Changed Type", {"ID"}, {{"Count", each Text.Combine([Merged],";"), type text}})

ID     Desc     length(Desc)

1       abc...      652

1       xyz...       4096

1       pqr...       4096

As per google i have used  group by using id and in query editor  i have used text.combine as well .But still it didnt work.

ID     Desc     length(Desc)

1       abc...      652

Im getting this result now...

 

My output shold be

ID   Desc

1    abcxyzpqr.......

 

Length i have included as example

 

PLease suggest any idea 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

try this

 

let
    comb=(desc)=> Text.Combine(desc,"#-#"),


    Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("7ZjBjpswEIZfxeIag9Jqo8JxtnQWDCnRumgPqxwsUZvYaEFFq6pvw7FnXsEv1slmlSeoqlSyhcb/eAY+RvpPfn6OPkQ8siL3S279Qo+y2i9Ok6pQMNXrwa+9qpVftdObabQIAvwyUMOgdIF+AWcH7ew8OOOoWc2m74ber9ZRmA2blemYYWo+R8poO+uLZN2sSF4OKNIiYd4OzflNdcmpaLpfP77/fGWvllmmLR1bIjJt3pd2pmeOOaOZ00abWMeaytPIJzaN42kaN6eT20RHfpm6bJtSFVDUfi1YVcNXGnToAWmvXxTNvVil5xea3OpzYAlXXTfrwTmlOVfI/tk/B9L/Qbp6697/PmyaLL3biYrs9MA/J/dxdWi+PVKGecLzJJbZXUpljOMC00+x5PiEX/zabJ9KlCJO9nuEfYyMBaMG0t8mBU8FUvBUIN06KXgqkIKnAunWScFTgRQ8FUg3Tnq7oPgY8agSdYV+FVCDX/xCcYX6WhUFiqrwawUFNWENpAEpFAjXJonnj9QoOUpIYJvJnV+3GaTZLt2DxIQsK7F8bMsWBcQI0i8HyNqmLR6EzEFGx+Mf", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, desc = _t]),
    #"Raggruppate righe" = Table.Group(Origine, {"id"}, {{"all", each comb(_[desc])}}),
    #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Raggruppate righe", "len", each Text.Length([all]))
in
    #"Aggiunta colonna personalizzata"

View solution in original post

1 REPLY 1
Anonymous
Not applicable

try this

 

let
    comb=(desc)=> Text.Combine(desc,"#-#"),


    Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("7ZjBjpswEIZfxeIag9Jqo8JxtnQWDCnRumgPqxwsUZvYaEFFq6pvw7FnXsEv1slmlSeoqlSyhcb/eAY+RvpPfn6OPkQ8siL3S279Qo+y2i9Ok6pQMNXrwa+9qpVftdObabQIAvwyUMOgdIF+AWcH7ew8OOOoWc2m74ber9ZRmA2blemYYWo+R8poO+uLZN2sSF4OKNIiYd4OzflNdcmpaLpfP77/fGWvllmmLR1bIjJt3pd2pmeOOaOZ00abWMeaytPIJzaN42kaN6eT20RHfpm6bJtSFVDUfi1YVcNXGnToAWmvXxTNvVil5xea3OpzYAlXXTfrwTmlOVfI/tk/B9L/Qbp6697/PmyaLL3biYrs9MA/J/dxdWi+PVKGecLzJJbZXUpljOMC00+x5PiEX/zabJ9KlCJO9nuEfYyMBaMG0t8mBU8FUvBUIN06KXgqkIKnAunWScFTgRQ8FUg3Tnq7oPgY8agSdYV+FVCDX/xCcYX6WhUFiqrwawUFNWENpAEpFAjXJonnj9QoOUpIYJvJnV+3GaTZLt2DxIQsK7F8bMsWBcQI0i8HyNqmLR6EzEFGx+Mf", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, desc = _t]),
    #"Raggruppate righe" = Table.Group(Origine, {"id"}, {{"all", each comb(_[desc])}}),
    #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Raggruppate righe", "len", each Text.Length([all]))
in
    #"Aggiunta colonna personalizzata"

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors