All topics

Topic 04 / 07

DAX

Turn data into insights

Skip to quiz· 10 questions
01

Measures

Measures are DAX calculations evaluated when a visual is queried. Their results respond to filter context, including slicers and rows in a visual. For example, Total Sales = SUM(Sales[Amount]) adds the amounts visible in the current context.

02

Calculated Columns

A calculated column produces a value for each row and is stored in the model. Use it when you need a row-level category or relationship key. Prefer a measure for totals that must change with a report selection.

03

CALCULATE

CALCULATE evaluates an expression in a modified filter context. For example, CALCULATE([Total Sales], Product[Category] = "Bikes") evaluates sales with a Bikes filter. Existing filters can be replaced or preserved depending on the filter arguments used.

04

FILTER

FILTER returns a table containing rows that satisfy a condition. It is useful for conditions that need row-by-row evaluation. For a simple column condition in CALCULATE, a direct Boolean filter is often clearer and more efficient.

05

SUMX

SUMX iterates over a table, evaluates an expression for each row and adds the results. For example, SUMX(Sales, Sales[Quantity] * Sales[UnitPrice]) calculates a total from quantity and price when a stored amount column is not available.

06

Time Intelligence

Time-intelligence functions compare values across periods, such as year to date or the same period last year. A reliable date table and correct relationships are essential. SAMEPERIODLASTYEAR can shift a date selection back one year inside CALCULATE.

07

Variables

Use VAR to name intermediate calculations, then RETURN the final result. Variables make complex expressions easier to read and debug. A variable is evaluated in the context where it is defined; changing context later does not automatically recalculate that stored value.

Topic quiz ahead10 questions to check what you understood — keep scrolling or tap here to jump straight to it.

Topic quiz

10 questions · answers show after you submit

  1. 1. When is a measure calculated?

  2. 2. When is a calculated column calculated?

  3. 3. Which function changes the filter context of an expression?

  4. 4. What does FILTER return?

  5. 5. What does SUMX do?

  6. 6. Which function returns year-to-date values?

  7. 7. Which function shifts dates back one year for comparison?

  8. 8. What keyword defines a variable in DAX?

  9. 9. Which function safely divides and handles divide-by-zero?

  10. 10. Which function removes filters from a table or column?