

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: DAX
incomplete
2: Logical Functions – IF
incomplete
3: SWITCH Function
incomplete
4: Time Intelligence Functions
incomplete
5: More Time Functions
incomplete
6: Add Columns
incomplete
7: Aggregations
incomplete
8: Aggregations As Measures
incomplete
9: Iterators
incomplete
10: Calculated Columns vs. Measures
incomplete
11: Context in DAX
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Iterator functions in DAX evaluate an expression row-by-row, then aggregate the results. They allow you to define what should happen in each row before summing, averaging, or comparing.
Aggregators look at a column, while iterators look at each row first.
Let's cover some of the most common functions.
The SUMX function iterates over a table, evaluating an expression for each row, then sums the results.
Total Sales Value = SUMX(
sales,
sales[sale_quantity] * RELATED(products[product_list_price])
)
RELATED lets us access the product_list_price column from the products table, even though this formula is in the sales table. This works because the sales and products tables have a relationship – they both have a product_id column. Power BI can often detect such relationships automatically.
The AVERAGEX function works similarly, but averages the results instead of summing them.
Average Sales Value = AVERAGEX(
sales,
sales[sale_quantity] * RELATED(products[product_list_price])
)
The MINX function finds the minimum value of an expression evaluated over a table.
Min Product Cost = MINX(
products,
products[product_standard_cost]
)
The MAXX function finds the maximum value of an expression evaluated over a table.
Max Product Cost = MAXX(
products,
products[product_standard_cost]
)
Iterator function names always end with X.
You can use the INT function to convert a decimal value to an integer.
Save the project and, from the course directory, submit the CLI tests.