PowerBI.tips

SUM & SUMX Tutorial – Curbal

April 6, 2017 By Mike Carlo
SUM & SUMX Tutorial – Curbal

What is the difference between SUM and SUMX in DAX?

TL;DR. SUM adds all the numbers in one column. SUMX is an iterator: it evaluates an expression for each row of a table, then adds the results. Use SUMX when the value must be calculated row by row. Curbal’s video walks through both.

What does SUM do in DAX?

SUM adds all the numbers in a column. Microsoft Learn gives the syntax as SUM(<column>), so it takes a single column reference.

What does SUMX do in DAX?

SUMX returns the sum of an expression evaluated for each row in a table. Microsoft Learn gives the syntax as SUMX(<table>, <expression>) and documents it as an iterator function.

When should I use SUMX instead of SUM?

Use SUMX when the number you need is not already a column and has to be computed for each row first, or when you want to sum over a filtered table. Microsoft’s SUM page points to SUMX for filtering the values you sum.

Which video does this post use?

The post embeds Curbal’s “DAX Fridays! #3: SUM and SUMX” from YouTube, starting at 1:52. Curbal publishes more DAX Fridays videos on its website and YouTube channel.

Where can I read more about DAX functions?

Start with Microsoft’s DAX function reference, plus the SUM and SUMX pages on Microsoft Learn. The post also links a PowerPivotPro article, now hosted by P3 Adaptive, on choosing between SUM, SUMX, and CALCULATE.

Related: Measures - Calculating a SUM, Using Variables within DAX, and UseRelationship DAX Tutorial – Curbal.

Learn how to use SUM() and SUMX() with this great video from Curbal. As you become more familiar with PowerBI you will increase your understanding of DAX (Database Analysis Expressions). Microsoft has an extensive list of all the expressions you can use found here.  One of the more common expressions you will use is SUM and SUMX.

Example of SUM, SUMX and Calculate from PowerPivotPro

Microsoft Documentation of SUM

Microsoft Documentation of SUMX

Using the SUMX and SUM expressions:

To learn more about DAX I have read both of these book and found them extremely helpful.  They both cover the basics and then quickly get you understand how to make complex calculations which you will need to make the right visual work.

Curbal has been generating a lot of great content.  To learn about for more information you can visit the website found here, or visit the YouTube Channel.

For more great videos about Power BI click the image below:

PBI Videos

Previous

Dynamic Filters in PowerBI

More Posts

Nov 20, 2026

What is Shadow AI? - Ep.582

Mike Carlo and Tommy Puglia look at shadow AI, where employees use their own AI tools whether or not company policy allows it, and compare it to the early days of shadow IT and self-service Power BI. They discuss the risks, who owns prompts and skills built on personal subscriptions, and why organizations are better off giving people sanctioned tools.

Nov 18, 2026

Exploring Database Hub - Ep.581

Mike Carlo and Tommy Puglia explore Database Hub in Microsoft Fabric, the preview control plane for monitoring SQL, PostgreSQL and Cosmos DB databases across Fabric, Azure and on-premises. They debate who it is really for, and what it can and can't do today.

Nov 13, 2026

Making Data AI Ready - Ep.580

Mike Carlo and Tommy Puglia work through James Serra's series on making data AI-ready, from data quality and business definitions to where instructions for agents should live. They also cover CI/CD for Fabric Warehouse, OneLake as native storage for Azure Databricks, and a Chicago user group session on the Power BI Desktop Bridge.