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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Shachar_Tal
New Member

Grouping by a list of columns

Hi,

I have a table that contains about 50 columns.... Some columns are parameters and some are plain text.

I'm trying to avoid selecting all aggregating columns manually so I need a way to dynamically group the table in a way that the aggregated columns are those given in a different list.

Any ideas??

Thanks

1 ACCEPTED SOLUTION
6 REPLIES 6
latimeria
Solution Specialist
Solution Specialist

Table.SelectColumns(table, listofcolumns).
You can get the list of columns by using Table.ColumnNames(table) to avoid misspelling

Hi,

Thanks for your response.

This method will only provide the table with the selected columns... The question is how do I group by these columns while aggregating all other columns?

Unfurtunately it did not work... As described in the other thread it lead to an error

Help us help you.

Upload some sample data in tabular format and desired result as well....

Thanks a lot, I believe this will work...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.