Skip to main content

What is Group By in Power Query?

Table of Contents

How can I create an aggregated table in Power Query?

The Group By function in Power BI is quite powerful when it comes to aggregation and organizing data. In Power Query, the Group By transformation aids in summarizing the data by grouping them into different categories, thus making it possible to, for instance calculate total sales by category or find the average order value by state or customer or even to see which was the most popular item among customers.

  1. Home tab, click Transform Data. The Power Query Editor will open.
  2. Select the table or query in the Power Query Editor which you wish to group.
  3. On the Transform tab, click the Group By button.
  4. Choose either Basic or Advanced. In Advanced, multiple groupings and aggregations can be applied.
  5. Select the column(s) by which you want to group the data.
  6. Specify a name for the new aggregated column, choose the operation (e.g. sum, min, max, count) and select the column for the aggregation.
  7. For operations more complex than these, select All Rows.
  8. Click OK to confirm and apply the changes.

Add comment