Forum Discussion
Grouping rows by Column and then updating Column
- 5 months ago
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).
If we choose Max, for example, we see:
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], "," )}})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
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).
If we choose Max, for example, we see:
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], "," )}})
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!