Back to All DAX Concepts
Aggregations

DAX SUM Function

The bedrock aggregator for numerical columns in Power BI.

Syntax Definition:
SUM( Table[Column] )

Overview

SUM adds all numbers in a column. It automatically respects the current filter context set by slicers, rows, columns, and visual filters.

Architectural Deep Dive

The SUM function accepts a single column reference. It cannot evaluate arithmetic expressions (like Price * Quantity) inside its arguments—for row-by-row math, use SUMX instead. Under the hood, SUM is optimized by Microsoft VertiPaq and operates directly against compressed columnar storage.

Canonical Pattern Example:

Total Revenue = 
SUM(Sales[Revenue])

Common Anti-Patterns & Mistakes to Avoid

  • Passing an expression instead of a column (e.g., SUM(Sales[Qty] * Sales[Price]) will cause a syntax error; use SUMX instead).
  • Using SUM in calculated columns when you intend dynamic report visual behavior.
  • Attempting to sum text or boolean values.
Interactive Challenge

Put DAX SUM Function into practice

Solve "Calculate Total Revenue" in our interactive Monaco editor with live dataset verification.