Power Fx function
GroupBy — Power Fx function reference
Group rows by columns.
Syntax
powerfx
GroupBy( Table, Column1 [, Column2, ... ], GroupColumnName )
Examples
powerfx
GroupBy(Sales, "Region", "Rows")
→ Grouped table
powerfx
GroupBy(Sales, "Region", "ByRegion")
powerfx
AddColumns(GroupBy(Orders, "CustomerID", "CustomerOrders"), "OrderCount", CountRows(CustomerOrders))
Common mistakes & gotchas
- The final argument names a new column holding a nested table of each group's rows — GroupBy alone does not aggregate; pair it with AddColumns plus Sum/CountRows on the nested table for per-group totals.
- GroupBy is not delegable on most connectors, so grouping a large tabular source only groups the rows already retrieved locally.
Related Power Fx functions
From Table shaping