Day 5 — Measures and calculated columns
The choice everyone gets wrong at first, and the reason reports get slow.
Two things that look identical and are not
| Calculated column | Measure | |
|---|---|---|
| Calculated | Once, at refresh | Every time a visual draws |
| Stored | Yes — takes memory | No — just a formula |
| Works row by row | Yes | No, unless you use an iterator |
| Reacts to slicers | No | Yes |
| Can be used as a slicer | Yes | No |
The deciding question
"Total sales" changes with every slicer, so it is a measure. "Price band" is a fixed property of a product, so it can be a column.
A calculated column, conceptually
A column is computed for every row and stored. On the Sales table you could write:
That is legitimate but wasteful — 48 stored numbers to hold something DAX can work out on the fly. On a ten-million-row fact table it is 10 million stored numbers.
The same job as a measure
No stored column, and unlike a column it responds to every slicer:
When a column really is the right answer
When you need to group or slice by the result. A measure cannot go on the axis of a chart or into a slicer — only a column can.
That belongs on the Product table as a column, because you want to put it on the rows of a visual. And notice which table it goes on — the dimension, where there are six rows, not the fact table where there are millions.
Naming measures properly
You will write a hundred of these. Names are how you find them again.
| Good | Bad | Why |
|---|---|---|
| Total Sales | Measure 1 | Says what it is |
| Sales LY | Sales2 | Reads in a visual header |
| Margin % | MarginPercentage | Spaces are allowed — use them |
| Orders | CountOfSalesID | Business language, not model language |
Measures referring to measures
Build small measures and stack them. Define Total Sales once, then use it everywhere:
In real Power BI you would write Margin % = DIVIDE([Margin], [Sales]), referring to the other measures by name in square brackets. Change the definition of Sales once and everything built on it follows. This playground needs each measure written out in full, but the principle is the one that matters.
Try these yourself
- Decide whether "number of orders this month" is a measure or a column.
- Decide whether "product category" is a measure or a column.
- Write a measure for average order value.
- Explain why a price band column belongs on Product rather than Sales.
- Rename the measure "CountOfSalesID" to something a manager would understand.
