


The details preview pane might not show all the rows that were used for the group-by operation. You can select the white space inside the cell to see a preview of the contents of the table at the bottom of the dialog box. Each value contains all the rows that were grouped by the Country and Sales Channel columns from your original table. Add a new Products column by using the All rows operation.Īfter that operation is complete, notice how the Products column has values inside each cell.Aggregate the Units column by using the Sum operation.Use the following columns as Group by columns:Ĭreate two new columns by doing the following: Starting from the original sample, in this example you'll a column containing the total units and two other columns that give you the name and units sold for the top-performing product, summarized at the country and sales channel level. Perform an operation to group by one or more columns The Count distinct values and Percentile operations are only available in Power Query Online. Outputs all grouped rows in a table value with no aggregations Operation NameĬalculates the average value from a columnĬalculates the minimum value from a columnĬalculates the maximum value from a columnĬalculates the percentile, using an input value from 0 to 100, from a columnĬalculates the number of distinct values from a columnĬalculates the total number of rows from a given groupĬalculates the number of distinct rows from a given group The following table describes each of these operations. With the Group by feature, the available operations can be categorized in two ways: This operation gives you the following table.

In New column name, enter Total units, in Operation, select Sum, and in Column, select Units.Select the Advanced option, so you can select multiple columns to group by.You'll use the Country and Sales Channel columns to perform the group by operation. In this example, your goal is to summarize the total units sold at the country and sales channel level.

Use an aggregate function to group by one or more columns On the shortcut menu when you right-click to select columns. On the Transform tab, in the Table group. You can find the Group by button in three places: Table with columns showing Year (2020), Country (USA, Panama, or Canada), Product (Shirt or Shorts), Sales channel (Online or Reseller), and Units (various values from 55 to 7500) Where to find the Group by button
