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

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

Reply
PriyankaBhamare
Regular Visitor

groupby function in power query editor

Hello, 
I am working on power query editor. I have a table with multiple columns. I need to group "team member names"* (in a comma seperated foormat) by the "team name"* (which is repeating) and keep data of other columns same as it as repeating with "team name". 

 

Kindly help me find the solution. 
(Table: contains 10 columns, 8 text* and 2 decimal data type) 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PriyankaBhamare ,

Please try:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("VY07DoAgEAXvQk2hCGKLeAtCgf9G71+Ku5voKzabSSbzUlIhKK3ucm1t/W3TvK/IEWb9k8wnzXIVDUnjKFKHpYWxIylGkSyWVkaLcw5LG6PDuR5LO2OPcx5LB6MnaZpEGrB0Mg4q5wc=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"team name" = _t, #"team member names" = _t, #"other column1" = _t, #"other column2" = _t, #"other column3" = _t, #"other column4" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"team name", type text}, {"team member names", type text}, {"other column1", Int64.Type}, {"other column2", type text}, {"other column3", type text}, {"other column4", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"team name"}, {{"team member names", each Text.Combine(List.Distinct([team member names]),",")}, {"Data", each _}})
in
    #"Grouped Rows"

vcgaomsft_0-1716945934959.png

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 -- China Power BI User Group

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @PriyankaBhamare ,

Please try:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("VY07DoAgEAXvQk2hCGKLeAtCgf9G71+Ku5voKzabSSbzUlIhKK3ucm1t/W3TvK/IEWb9k8wnzXIVDUnjKFKHpYWxIylGkSyWVkaLcw5LG6PDuR5LO2OPcx5LB6MnaZpEGrB0Mg4q5wc=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"team name" = _t, #"team member names" = _t, #"other column1" = _t, #"other column2" = _t, #"other column3" = _t, #"other column4" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"team name", type text}, {"team member names", type text}, {"other column1", Int64.Type}, {"other column2", type text}, {"other column3", type text}, {"other column4", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"team name"}, {{"team member names", each Text.Combine(List.Distinct([team member names]),",")}, {"Data", each _}})
in
    #"Grouped Rows"

vcgaomsft_0-1716945934959.png

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 -- China Power BI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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