DAX Function Guide

SUMMARIZE
Empty image or helper icon

Sam McKay

CEO & Founder

How does the SUMMARIZE work?
The SUMMARIZE function (DAX) returns a summary table for the requested totals over a set of groups.
SUMMARIZE Formula Syntax

SUMMARIZE(
     <table>, <groupBy_columnName>[, <groupBy_columnName>]…[ <name>, <expression>]…
)

How do you use the SUMMARIZE?

This function will summarize the huge amount of rows of data into one table with provided criteria column. For example, you may have multiple city sales values but each city has multiple rows of transactions, so using SUMMARIZE function we can create a summary table where each city will have an only one-row transaction with the summarized line.

The SUMMARIZE function is best use to perform only the grouping of values, avoiding its use to compute additional columns.

Related Blog Posts

Loading

Considerations when using the SUMMARIZE?
  1. Each column for which you define a name must have a corresponding expression; otherwise, an error is returned. The first argument, name, defines the name of the column in the results. The second argument, expression, defines the calculation performed to obtain the value for each row in that column.
  2. groupBy_columnName must be either in table or in a related table to table.
  3. Each name must be enclosed in double quotation marks.
  4. The function groups a selected set of rows into a set of summary rows by the values of one or more groupBy_columnName columns. One row is returned for each group.
Related Video Tutorials

Loading

Formula examples using the SUMMARIZE

SUMMARIZE(ResellerSales_USD , ROLLUP( DateTime[CalendarYear], ProductCategory[ProductCategoryName]) , “Sales Amount (USD)”, SUM(ResellerSales_USD[SalesAmount_USD]) , “Discount Amount (USD)”, SUM(ResellerSales_USD[DiscountAmount]) )

SUMMARIZE(ResellerSales_USD , ROLLUP( DateTime[CalendarYear], ProductCategory[ProductCategoryName]) , “Sales Amount (USD)”, SUM(ResellerSales_USD[SalesAmount_USD]) , “Discount Amount (USD)”, SUM(ResellerSales_USD[DiscountAmount]) , “Is Sub Total for DateTimeCalendarYear”, ISSUBTOTAL(DateTime[CalendarYear]) , “Is Sub Total for ProductCategoryName”, ISSUBTOTAL(ProductCategory[ProductCategoryName]) )

= SUMMARIZR(Sales_Table, Sales_Table[State],Sales_Table[Category], “Sales Value”,SUM(Sales_Tables[Sales]))

Related Courses

Loading