Cheat Sheets/Power BI/SUMX
DAX function

SUMXDAX function reference

Sum a per-row expression.

Syntax

dax
SUMX(<table>, <expression>)

Examples

dax
SUMX(Sales, Sales[Qty] * Sales[Price])
A number

RELATED pulls the per-unit cost from the Product table into each Sales row before SUMX multiplies and totals.

dax
SUMX(Sales, Sales[Qty] * RELATED(Product[UnitCost]))
Total cost of goods sold
dax
SUMX(FILTER(Sales, Sales[Region] = "West"), Sales[Amount] * (1 - Sales[DiscountPct]))
Net West-region revenue after discount

Common mistakes & gotchas

Related DAX functions

From Aggregations

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet