DAX function
SUM — DAX function reference
Total a column.
Syntax
dax
SUM(<column>)
Examples
dax
SUM(Sales[Amount])
→ A number
SUM aggregates a physical column under the current filter context; wrapping in DIVIDE guards against a blank/zero denominator.
dax
DIVIDE(SUM(Sales[Profit]), SUM(Sales[Amount]))
→ Overall profit margin ratio
dax
CALCULATE(SUM(Sales[Amount]), Sales[Channel] = "Online")
→ Online-channel total, regardless of the channel slicer
Common mistakes & gotchas
- SUM only works on a physical column, not a per-row expression — for a multiply-then-sum pattern like Qty × Price you need SUMX.
- SUM ignores blank rows automatically, but it returns BLANK() (not 0) when no rows match the current filter context, which matters if you use the result as a denominator.
Related DAX functions
From Aggregations