SUMMARIZECOLUMNS – grouping in data model (DAX – Power Pivot, Power BI)
This is about the SUMMARIZECOLUMNS function. It groups values in a table, similarly to older SUMMARIZE. (More about it here.)
One group and one calculated column
Simple example. In this table we are going to group by Animals and summarize total numbers of units.
Let´s do it with this syntax:
- Total units by Animals =
SUM('Table'[Price per unit])
There are these arguments - column used for grouping, name of new calculated group and calculation used to create it.
This is an example of more complex syntax - with two grouping columns and two calculated columns, using for example SUMX function.