Measures versus columns
A measure answers a question in context
A measure is a named scalar expression evaluated for the current query context. The model stores its definition, not a permanent result for every possible slicer combination. The engine may cache work; that does not make a measure a stored row value. Use measures for reusable metrics that respond to selections. Use the clean V007 Import model from labs/relationships/README.md with FactSales, DimProduct and DimRegion and active single-direction relationships. The five order lines are dated January 5–7, 2026; all amounts are USD. Quantity, price and cost are validated nonblank numbers. Use a disposable local copy and clear unrelated filters. Each formula belongs in the explicitly named editor, with English comma separators. All outputs are expected, not observed in Power BI; native DAX/M NOT RUN. Create the previous lesson’s Line Amount Check column first.
Example 1: aggregate a column
Create a New measure (not New column):
Revenue From Lines = SUM(FactSales[Line Amount Check])A card without filters should show 200 USD. On a table with DimRegion[Region], North should show 104 and South 96. The measure evaluates separately for each grouping and for the overall context. The existing [Total Revenue] should match. A column can be used as an axis or slicer; an ordinary measure is a value or a visual-level filter, not a categorical slicer field.
Example 2: calculate without an extra stored column
A DAX iterator evaluates an expression for each row of a table. SUMX then adds the numeric results. Syntax: SUMX(table, expression). Create this separate New measure:
Revenue From Iterator =SUMX(FactSales, FactSales[Quantity] * FactSales[UnitPriceUSD])Under North, the visible fact rows are L01, L02 and L04, so the result is 24 + 30 + 50 = 104. With no region filter it is 200. The filter context restricts the input table; SUMX supplies row context for each multiplication. With Notebook in South only L03 matches and both measures give 36. With Backpack in South no rows match and the expected result is BLANK. This introductory example uses simple clean Import data; native iterator execution is untested.
Avoid the tempting wrong formula
SUM(FactSales[Quantity]) * SUM(FactSales[UnitPriceUSD]) multiplies two independent totals. Here 9 × 134 = 1206, not 200. Multiplying quantities and prices within their matching rows is essential. Also avoid putting SUM(FactSales[RevenueUSD]) in a New column expecting a per-line amount; without context transition it repeats the whole-table sum in each row of this simple Import example. The later context lessons explain why.
Refresh, interaction and performance
A report filter changes the rows contributing to a measure but does not retrieve updated imported source rows. After editing L01 quantity from 2 to 3 in a lab-owned CSV copy, update the source RevenueUSD and CostUSD consistently; before data refresh the original imported snapshot is expected to remain at 200. After a successful refresh it should be 212, including L01 at 36. Stored columns trade model size/processing for possible simpler query work, while iterators can add query work; actual performance needs measurement. DirectQuery expressions and calculated columns depend on source, storage mode and function restrictions; do not generalize this Import example.
Practice
Complete worksheet task 2: reconcile the two measures, show why the product of sums fails, and record predictions before and after refreshing a copied source.
Official reading
measures · sumx · context · refresh · directquery. Documentation checked; exact installed build and native execution pending.