Explicit measures
Explicit measures turn a metric into a named contract
An implicit aggregation is created when a visual summarizes a numeric column directly, such as Sum of RevenueUSD. An explicit measure is a named DAX formula stored in the model and reusable by multiple visuals. A measure evaluates against the current filter context: the set of restrictions supplied by the visual, slicers and relationships. It is not a stored result for each fact row. Use the V007 clean Import model from labs/relationships/README.md: FactSales, DimProduct and DimRegion, active single-direction one-to-many relationships. Currency is USD, one row per order line, Jan 5–7 2026. Clear unrelated filters. Formula snippets are individual New measure definitions, not a DAX query or a single multi-measure script. Use comma argument separators and decimal points (English teaching syntax); local separator settings may differ. All outputs are predicted, native DAX NOT RUN.
Create measures separately
Choose the FactSales table and New measure. Enter one definition, confirm, then repeat for the next. SUM requires a column; COUNTROWS takes a table expression. Measure names are bracketed when referenced by other measures. Format currency values as USD, counts as whole numbers. Do not use FORMAT simply to display currency because it changes the result into text.
Example 1: sales and line count
Total Revenue = SUM(FactSales[RevenueUSD])Sales Lines = COUNTROWS(FactSales)Units Sold = SUM(FactSales[Quantity])Without filters the five revenues 24, 30, 36, 50, 60 sum to 200; there are 5 lines and 9 units. Select North using DimRegion: L01, L02 and L04 remain, so revenue is 104, lines 3 and units 4. South yields 96, 2 and 5. The measure definitions have not changed.
Example 2: reuse measures to calculate profit
Total Cost = SUM(FactSales[CostUSD])Gross Profit = [Total Revenue] - [Total Cost]All rows: cost 126 and gross profit 74. North: cost 66 and profit 38. South: cost 60 and profit 36. These amounts exclude tax, shipping and overhead by fixture design; gross profit here is not net profit. Put the measures in a table with DimRegion[Region], then reconcile the total. Changing a visual from sum to average of a raw column is not a change to the named Total Revenue formula.
Choose the correct input
SUM(FactSales[Quantity] * FactSales[UnitPriceUSD]) is intentionally invalid: SUM expects a column, not a row expression. Use the existing validated RevenueUSD column here; an iterator such as SUMX is a later topic. COUNTROWS counts lines, not unique orders. Review filters, relationship direction and source grain before changing a formula to fix a suspicious total.
Practice
Complete task 2 in the worksheet. Calculate the three totals for Desk Lamp and its North subset and explain why the same measure can return different values.