How to Use SUMMARIZECOLUMNS in Power BI

Cody Schneider8 min read

Building custom summary tables is a huge time-saver in Power BI, and the SUMMARIZECOLUMNS function is your go-to tool for doing it. It might look a little intimidating at first, but it’s one of the most efficient ways to group and aggregate your data. This tutorial will walk you through exactly what SUMMARIZECOLUMNS does, how its syntax works, and how you can use it with practical examples to build insightful reports.

What Exactly Is SUMMARIZECOLUMNS?

At its core, SUMMARIZECOLUMNS is a DAX function that generates a summary table based on the columns and calculations you provide it. Think of it as a super-powered pivot table creator that lives inside your DAX code. You tell it which columns to group by (like product category, region, or date), and what numbers to calculate for each group (like total sales, average order value, or customer count). The result is a brand new, clean table containing just the summarized information you asked for.

If you’ve been around DAX for a while, you might have also come across the SUMMARIZE function. While they sound similar, SUMMARIZECOLUMNS is the modern, recommended function for a few key reasons:

  • Performance: It's generally more optimized and faster than its older sibling.
  • Clarity: The syntax is more straightforward and easier to read.
  • Predictability: SUMMARIZE has some complex, behind-the-scenes behaviors (like context transition) that can catch you by surprise. SUMMARIZECOLUMNS is more direct and behaves exactly as you'd expect, making it the safer and more reliable choice for creating summary tables.

In short, when you need to create a table that summarizes your data, start with SUMMARIZECOLUMNS.

Breaking Down the SUMMARIZECOLUMNS Syntax

The function's structure might seem complex, but it becomes simple once you understand each piece. Here’s the blueprint of the syntax, which we’ll break down line by line.

SUMMARIZECOLUMNS( <groupBy_columnName>[, <groupBy_columnName>…], [<filterTable>…], "<name>", <expression>[, "<name>", <expression>…] )

Parameters Explained

  • <groupBy_columnName>: These are the columns you want to group your data by. You can list one or several. For example, if you want to see sales by country, you’d use 'Geography'[Country]. If you want to see sales by country and product category, you’d list both: 'Geography'[Country] and 'Products'[Product Category].
  • <filterTable>: This optional part lets you filter your data before any grouping or calculations happen. This is incredibly useful for restricting your summary to a specific time period, region, or segment. You typically use DAX filter functions here, like FILTER() or TREATAS().
  • "<name>": This is the name you give to your new calculated column, and it must be enclosed in double quotes. For example, "Total Revenue" or "Customer Count".
  • <expression>: This is the DAX formula that calculates the value for your new column. It’s always paired with a "<name>". For "Total Revenue", the expression might be SUM('Sales'[Sales Amount]).

The pattern is simple: for every calculation you want to add, you provide a name in quotes followed by the DAX expression for the calculation.

Your First Summary Table: A Step-by-Step Example

Let's make this real. Imagine you have a data model with a Sales table (containing Sales Amount and Units Sold), a Products table (with Product Category), and a Calendar table (with Year). Your goal is to create new summary tables from this data.

Since SUMMARIZECOLUMNS creates a table, you'll use it in the "New Table" view in Power BI.

Go to the Report View or Data View, select the Modeling tab from the ribbon, and click New Table.

Example 1: Total Sales by Product Category

For your first task, you just want a simple table showing the total sales for each product category. In the DAX formula bar for your new table, enter the following:

Sales by Category = SUMMARIZECOLUMNS( 'Products'[Product Category], "Total Sales", SUM('Sales'[Sales Amount]) )

Once you hit Enter, Power BI creates a new two-column table. Let's trace what happened:

  • 'Products'[Product Category] tells Power BI to create a unique row for each product category it finds.
  • The pair "Total Sales" and SUM('Sales'[Sales Amount]) tells it to create a new column named "Total Sales" and calculate the sum of sales for each of those categories.

That's it! You now have a neat, pre-aggregated table ready to use in your visuals.

Example 2: Adding More Groups and Calculations

What if you need more detail? Let’s expand the table to show total sales and total units sold, broken down by both category and sales region. You just need to add more arguments to the function.

Sales by Category and Region = SUMMARIZECOLUMNS( 'Products'[Product Category], 'Geography'[Region], "Total Sales", SUM('Sales'[Sales Amount]), "Total Units", SUM('Sales'[Units Sold]) )

The logic is exactly the same, but now we've added more building blocks:

  • We added 'Geography'[Region] to the grouping section, creating a unique row for each combination of category and region.
  • We also added a second name/expression pair: "Total Units" and SUM('Sales'[Units Sold]) to create another calculated column.

Example 3: Adding a Filter

Now, let’s say your boss only wants to see the sales summary for 2023. This is where the filterTable argument comes in handy. By adding a FILTER function, you can process only the data that matches your criteria.

Sales in 2023 = SUMMARIZECOLUMNS( 'Products'[Product Category], FILTER('Calendar', 'Calendar'[Year] = 2023), "Total Sales", SUM('Sales'[Sales Amount]) )

Here, we’ve inserted FILTER('Calendar', 'Calendar'[Year] = 2023) before the calculations. This tells Power BI to first filter the entire data model down to just the year 2023 and then perform the grouping and summation. This is a very efficient way to create focused summary reports.

Common Mistakes to Avoid

As you start using SUMMARIZECOLUMNS, you might run into a few common hurdles. Here are some tips to help you navigate them.

1. Mismatched "Name" and "Expression" pairs

Every calculation requires both a name and an expression. A common mistake is forgetting the name in quotes or having a name without a corresponding expression. Remember, they always come in pairs: "My New Column", [My DAX Measure].

2. Dealing with Blank Rows

Sometimes, your resulting table might include a blank row. This typically happens when there is a value in one of your grouping columns that has no matching data in the table being calculated. For example, if you have a "Product Category" of "Accessories" but there were zero sales for it, SUMMARIZECOLUMNS might create a row for "Accessories" with a blank result. It's not an error, but it's important to understand why it happens - it’s reflecting the integrity of your data model.

3. Keep Your Data Model Relationships in Mind

The function relies on the relationships you've set up in your data model. If your Sales table and your Products table aren't properly linked, SUMMARIZECOLUMNS won't know how to group sales by product category. Always make sure your model's relationships are solid before writing your DAX.

Practical Use Cases for SUMMARIZECOLUMNS

So, when would you actually use this function instead of just building a visual?

  • For Performance Boosts: If you have a complex visual on a very large dataset, letting Power BI do the aggregation on the fly can be slow. Creating a pre-aggregated summary table with SUMMARIZECOLUMNS and pointing your visual to that smaller table can make your report significantly faster.
  • For Data Scaffolding: It's perfect for creating tables needed for more advanced calculations. For example, creating a table of your top 10 customers so you can perform further analysis on just that group.
  • For Validation and Debugging: Sometimes, the quickest way to check if a measure is working correctly is to create a quick summary table organized by different attributes to see the numbers laid out plainly.
  • Inside a Measure for Nested Calculations: This is a more advanced technique, but you can use SUMMARIZECOLUMNS inside another DAX function to create a virtual table on the fly. For instance, to calculate the average of sales across all product categories, you could write:

Average of Category Sales = AVERAGEX( SUMMARIZECOLUMNS( 'Product'[Product Category], "Category Total Sales", SUM('Sales'[Sales Amount]) ), [Category Total Sales] )

Final Thoughts

Mastering SUMMARIZECOLUMNS is a significant step toward becoming proficient in DAX. It gives you precise control over creating custom, aggregated tables, allowing you to optimize report performance, build sophisticated calculations, and explore your data in a more direct way.

While learning DAX syntax like this is incredibly empowering, it does require time and practice. At Graphed, we’re removing that layer of complexity. Our platform connects directly with your data sources - like Shopify, Google Analytics, or Salesforce - and allows you to build real-time dashboards and reports simply by asking for what you want in plain English. Instead of writing formulas to summarize your data, you can just ask, "Show me my total sales by product category for this year," and we handle the rest. Explore data faster by signing up for Graphed for free.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.