thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Iterator Functions

DAX functions ending in X (SUMX, AVERAGEX, COUNTX, MAXX, RANKX) that evaluate an expression row by row over a table and then aggregate.

Definition

Iterators create row context. They are needed when the calculation must be done per row before aggregating, such as quantity × price.

Example

Revenue = SUMX(Sales, Sales[Quantity] * Sales[Price])

Exam tip

SUM(Qty) * SUM(Price) is wrong for revenue; use SUMX to multiply per row.

Related terms