BLANK and DIVIDE
A missing result is not a measured zero
BLANK represents an absent or undefined result in DAX; numeric zero is an actual value. For example, a zero-revenue promotional sale exists in the data, while Backpack in South has no matching line. A displayed blank or missing visual category does not establish which cause applies. ISBLANK tests whether an expression is blank; avoid relying on loose equality with zero because DAX may coerce blank values. 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 the previous measures including Orders and Gross Profit before proceeding.
Use DIVIDE with a documented policy
Syntax: DIVIDE(numerator, denominator [, alternateResult]). A zero or blank denominator produces BLANK by default. The optional alternative must be constant. Choose zero only where the business has explicitly defined zero to be the correct result; an undefined margin is usually not zero percent. Prefer DIVIDE when a denominator can be zero or blank. Format a fractional margin as Percentage, not by multiplying by 100 as well.
Example 1: revenue per order and profit margin
Average Order Revenue = DIVIDE([Total Revenue], [Orders])Gross Margin =VAR Profit = [Gross Profit]VAR Revenue = [Total Revenue]RETURN DIVIDE(Profit, Revenue)All rows: 50 USD/order and 37%. North: 104/2 = 52 USD/order and 38/104 ≈ 36.54%; South: 96/2 = 48 USD/order and 36/96 = 37.5%. Grand margin uses 74/200, not the arithmetic mean of the region margins. The denominator is selected revenue, not cost. This is an educational metric, not an audited financial statement.
Example 2: empty selection versus actual zero
In the clean model select Backpack and South simultaneously: no rows match. Sales Lines and Orders return BLANK in native DAX as documented for empty inputs. Revenue and both ratios are expected blank. A table may suppress groups where all displayed measures are blank; inspect slicers and use a diagnostic card or table. In a separate disposable model load labs/fixtures/dax-v1/zero-revenue.csv as FactSales, keeping the clean dimensions; it adds one zero-price sample line for Backpack in South. Under the same filter there is now one order, one line and zero revenue, with cost 5 and profit -5. Average Order Revenue is 0; Gross Margin remains BLANK because revenue is zero. This distinguishes a genuine zero numerator from an undefined ratio.
Do not hide missing data
DIVIDE([Gross Profit], [Total Revenue], 0) would make the zero-denominator margin look like an observed 0%. That is a different policy, not a harmless formatting fix. Use ISBLANK([Gross Margin]) in a diagnostic measure if needed, and explain absence separately from data errors. SQL NULL and DAX BLANK have different rules; independent SQL checks in this package only verify arithmetic and row selection.
Practice
Complete task 4 of the worksheet. Compare the clean and zero-revenue fixtures, document when zero is meaningful, and reconcile margin across the full dataset. Native engine output remains to be tested.