DAX function
SUMMARIZE — DAX function reference
Group rows and summarize.
Syntax
dax
SUMMARIZE(<table>, <groupBy_column1> [, <groupBy_column2>, …] [, <name>, <expression>, …])
Examples
dax
SUMMARIZE(Sales, Region[Name], "Sales", SUM(Sales[Amount]))
→ A grouped table
Using SUMMARIZE purely for grouping, with no aggregation columns, is the safe, well-supported use case.
dax
SUMMARIZE(Sales, 'Date'[Year], 'Date'[Quarter])
→ Distinct Year/Quarter combinations present in Sales
dax
ADDCOLUMNS(SUMMARIZE(Sales, Product[Category]), "Sales", CALCULATE(SUM(Sales[Amount])))
→ The recommended pattern: group with SUMMARIZE, aggregate with ADDCOLUMNS
Common mistakes & gotchas
- Do aggregations with ADDCOLUMNS over SUMMARIZE, or use SUMMARIZECOLUMNS — plain SUMMARIZE aggregation can misbehave.
- SUMMARIZE's own extension-column aggregation (the trailing name/expression pairs) can silently return unexpected totals in more complex filter contexts because of how it interacts with the engine's auto-exist behavior — Microsoft's own guidance is to use SUMMARIZE only for grouping and layer aggregations on with ADDCOLUMNS, or use SUMMARIZECOLUMNS instead.
- The grouping columns can come from any table connected in the model via a relationship path, not just the table argument itself.
Related DAX functions
From Iterators & variables