DAX has two families of aggregation: plain aggregators like SUM that work on a single column, and iterators (the X functions) that evaluate an expression row by row, then aggregate.
The X functions
-- Plain: sums an existing columnTotal = SUM(Sales[Amount])-- Iterator: computes a value per row, then sumsRevenue = SUMX(Sales, Sales[Qty] * Sales[Price])│ │ └ expression evaluated for EACH row│ └ the table to iterate└ then sum the results
Every aggregator has an X twin: SUMX, AVERAGEX, COUNTX, MAXX. Use the X version when the value you need doesn't already exist as a column but must be computed per row (like quantity × price).
Key takeaways
- 01Plain aggregators (SUM, AVERAGE) work on one existing column.
- 02Iterators (SUMX, AVERAGEX…) evaluate an expression per row, then aggregate.
- 03Use an X function when the value must be computed per row (e.g. qty × price).
- 04Iterators avoid needing an extra calculated column, keeping the model lean.
