Back to Roadmap
Level 3 — Iterators & X-Functions+75 XP
Lesson 1
1. Understanding SUMX
Calculate row expressions on the fly before aggregating.
The Concept
SUMX iterates over a table, evaluates an expression row-by-row, and sums the results.
Example DAX:
// Calculates Price * Quantity row-by-row without creating a physical column!
Calculated Revenue =
SUMX(
Sales,
Sales[Quantity] * RELATED(Products[Price])
)SUMX takes two arguments: a Table, and an Expression. For each row of the table, it creates a Row Context, computes the expression, and sums up the total.
Try It Yourself
Use SUMX to iterate over the Sales table and multiply Quantity by Price directly.
fx
[fx]Understanding SUMX=
Loading DAX Formula Studio...
Type [ for fields