Stop 07 · DAX FundamentalsTopics · 3/10

Calculated Columns vs Measures

Part of the Power BI Roadmap

In short

Calculated column or measure? It's the first DAX decision you make for every calculation, and the wrong choice gives either wrong totals or a bloated, slow model.

A calculated column is computed once per row at refresh and stored in the model, while a measure is computed at query time based on the current filters. Most numbers on a report should be measures.

The jaadu sticks small printed price tags on rows of jars on one side, and on the other punches a big calculator at a billing counter beside a full shopping basket.

Think of it like this

Printed price tag vs a calculator at the counter

A price tag is printed on each item once and never changes: that's a calculated column, worked out per row at refresh. The calculator at the billing counter adds up whatever is in your basket right now: that's a measure, worked out for the current selection every time you look.

Watch it happen

Column vs measure

Calculated column

  • Computed per row at refresh
  • Stored in the model, uses memory
  • Can go on slicers and axes
  • Doesn't react to slicers

Measure

  • Computed when a visual asks
  • Not stored, no extra memory
  • Reacts to every filter
  • Right for totals, ratios and KPIs

If you need to slice or group by it, use a column. If you need to add it up or compare it, use a measure.

The big ideas

What you need to know

Columns think in rows

A calculated column sees one row at a time, like Sales[Qty] * Sales[Price] for that line.

Measures think in filters

A measure is evaluated for each cell of a visual, using that cell's filters.

Ratios must be measures

A margin % column summed across rows gives nonsense totals. A measure divides the totals correctly.

Columns cost memory

Every calculated column is stored for every row. On a 10 million row table that adds up.

See it in code

Walk through the code

dax
1-- Calculated column on Sales: one value per row, stored2Price Band =3IF ( Sales[Unit Price] >= 1000, "Premium", "Regular" )4 5-- Measure: recalculated for every cell of a visual6Margin % =7DIVIDE (8    SUM ( Sales[Amount] ) - SUM ( Sales[Cost] ),9    SUM ( Sales[Amount] )10)

1/2Each sales line gets a fixed label at refresh. You can put Price Band on a slicer or axis.

Price Band is something you group by, so it's a column. Margin % must react to filters and total correctly, so it's a measure.

Save yourself the pain

Common mistakes

Oops

Making Margin % a calculated column and showing it in a table.

Do this instead

The visual will sum or average the row percentages, which is wrong. Make it a measure that divides totals.

Oops

Creating calculated columns for every numeric step.

Do this instead

Columns that only feed a total, like Qty * Price, can be done inside a measure with SUMX instead.

Your mission

Spot the wrong total

~20 min

Quick check

You want users to slice the report by Price Band (Premium or Regular). What should Price Band be?

Go deeper

  1. 1Create the same profit calculation as a column and a measure and compare.
  2. 2Use calculated columns mainly for values you need to slice or filter by.
  3. 3Check how calculated columns increase model size.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge