DAX SUM function

Adds up all the numbers in a column.

SUM is the first function most people write in Power BI. It adds every number in one column, under whatever filters the visual applies: in a table by Country, each row adds only that country's rows.

Syntax

SUM(<column>)
ArgumentRequiredDescription
columnRequiredThe column that contains the numbers to add. It must be a column, not an expression.

Returns: A decimal number. Blank if there are no rows.

Examples

Calculated on the free practice data (table financials), with [Total Sales] = SUM(financials[Sales]) and [Total Profit] = SUM(financials[Profit]).

1. Total sales

Total Sales = SUM(financials[Sales])

Result: 118,726,350.26

All 700 sales rows added up.

2. Total sales by country

Total Sales = SUM(financials[Sales])
CountryTotal Sales
Canada24,887,654.88
France24,354,172.29
Germany23,505,340.82
Mexico20,949,352.11
United States of America25,029,830.16
Total118,726,350.26

The same measure in a table by Country: each row is filtered to one country, and the total row has no country filter.

Good to know

  • SUM takes a column only. To add a calculation per row, like Units × Price, use SUMX.
  • Blank values are ignored. Text in a number column causes an error.
  • Write it as a measure, not a calculated column, so it responds to filters.

Related functions

Official reference: SUM function on Microsoft Learn