

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
Context is one of the most important concepts in DAX. It determines how a DAX expression is evaluated and which rows are included in the calculation.
There are two types of context you must understand: Row Context and Filter Context.
Row context exists when DAX evaluates a formula for each row of a table. You get row context in DAX when you:
SUMX, AVERAGEX, MINX, MAXXADDCOLUMNSExample in a calculated column:
Revenue Column = sales[sale_quantity] * RELATED(products[product_list_price])
DAX evaluates this expression for each individual row. No slicers or visuals can change this value, because row context is created at model-processing time.
Row context = DAX evaluating expressions row-by-row.
Filter context exists when DAX evaluates a measure using only the rows allowed by filters.
Filter context is created by:
CALCULATE function (which can modify filter context)Example measure:
Total Quantity = SUM(sales[sale_quantity])
When DAX runs this measure, it applies all active filters – from visuals, slicers, relationships, CALCULATE, etc. Then it sums the Quantity column only for the rows in the filtered set.
Filter context = DAX evaluating expressions using the currently filtered rows.
customers don't relate directly to dates)Save the project and, from the course directory, submit the CLI tests.
Remove the date box to filter after you successfully pass the tests. We don't need or want it anymore.