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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
PeteyG
Helper I
Helper I

Grouping rows by Column and then updating Column

I am trying to group all the rows below together and then have all the Built column separated by a comma.  I tried "Group By" but it gets rid of a bunch of my columns and having issues with the comma space.  Anyone have tips.  Vehicle I would use as the main header but everything is the same but where it is built.  Thanks for any help.

 

I want to turn this:

Vehicle  Color  Int Color  Doors  Year  Seating  Built
TruckRedBlack4265Detroit
TruckRedBlack4265Miami
TruckRedBlack4265Mexico City
CarPinkBlack2252Miami
CarPinkBlack2252Mexico City
VanWhiteBlack5268Detroit
VanWhiteBlack5268Miami
VanWhiteBlack5268

London

 

Into This:

Vehicle  Color  Int Color  Doors  Year  Seating  Built
TruckRedBlack4265Detroit, Miami, Mexico City
CarPinkBlack2252Miami, Mexico City
VanWhiteBlack5268Detroit, Miami, London
1 ACCEPTED SOLUTION
jennratten
Super User
Super User

Hi @PeteyG  - thanks for posting in the Fabric Community. Please review the solution below and let me know if you have any questions.

When you group table data in Power Query, the columns in the original table become lists.  We can see this by choosing the Group By option from the UI menu, selecting Sum, Average, Min or Max as the operation and then looking at the script generated. (The last three create table functions because they are looking at the table rather than just one selected column).

jennratten_3-1774439805845.png

 

 

If we choose Max, for example, we see:

jennratten_4-1774439942759.png

 

Now that we know we are dealing with the column as a list, we can use Text.Combine, which creates delimited text from a list.

= Table.Group(#"Changed Type", {"Vehicle  ", "Color  ", "Int Color  ", "Doors  ", "Year  ", "Seating  "}, {{"Built", each Text.Combine ( [Built], "," )}})

jennratten_0-1774439540540.png

 

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

View solution in original post

2 REPLIES 2
jennratten
Super User
Super User

Hi @PeteyG  - thanks for posting in the Fabric Community. Please review the solution below and let me know if you have any questions.

When you group table data in Power Query, the columns in the original table become lists.  We can see this by choosing the Group By option from the UI menu, selecting Sum, Average, Min or Max as the operation and then looking at the script generated. (The last three create table functions because they are looking at the table rather than just one selected column).

jennratten_3-1774439805845.png

 

 

If we choose Max, for example, we see:

jennratten_4-1774439942759.png

 

Now that we know we are dealing with the column as a list, we can use Text.Combine, which creates delimited text from a list.

= Table.Group(#"Changed Type", {"Vehicle  ", "Color  ", "Int Color  ", "Doors  ", "Year  ", "Seating  "}, {{"Built", each Text.Combine ( [Built], "," )}})

jennratten_0-1774439540540.png

 

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

You are awesome!!  Thank you so much.  I have been struggling with Group By for two days.  You instructions helped me with where I went wrong.  Thanks again!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.