Group by columns

You can group rows by one or more columns with the help of the GROUP_BY() function.

Group by one column.

Group by two columns.

Note: By default, the name of the grouped column corresponds to the name of the column the rows are grouped by plus the prefix "by_". To change the name of the grouped column, use the following expression: column_name as new_column_name.

For example, if in the GROUP_BY() function you specified "warehouse" as the column to group by:

=GROUP_BY(B12, "warehouse")
Copy to clipboard

The grouped column name in the resulting frame defaults to "by_warehouse".

To change the default name of the grouped column to "count", use

=FRAME(B12,"warehouse as count")
Copy to clipboard

Try it now

Contents