The SUMMARIZE function in Power BI is used to create a summary table or group data based on one or more columns. It is often used in combination with other aggregation functions like SUM, COUNT, AVERAGE, etc. Here’s an example of how to use the SUMMARIZE function in a dataset:
- Open Power BI Desktop and load your dataset into the data model.
- Go to the “Modeling” tab in the Power BI Desktop.
- Click on “New Table” to create a new calculated table.
- In the formula bar, write the following syntax using the SUMMARIZE function:
SummaryTable =
SUMMARIZE(
Sales,
Sales[Category],
"Total Sales", SUM(Sales[TotalAmount]),
"Total Quantity", SUM(Sales[Quantity])
)