Calculated Columns vs Measures
Power BI · DAX (Data Analysis Expressions)
Theory
A calculated column is computed once per row when the data is refreshed and stored in the table, just like an imported column. It uses row context, so it can read other columns of the same row: Unit Price = DIVIDE(Sales[Amount], Sales[Qty]) gives 600 for order 101. Because it is stored, it uses memory and can be placed on slicers, axes, legends and relationships.
A measure is not stored; it is calculated at query time for each cell of a visual using the current filter context, and its result is always a single value. Total Sales = SUM(Sales[Amount]) gives a different answer per region or month. Measures cannot be used as slicer values or relationship keys, but they are what you put in the Values area. A good rule: if you need to slice or group by it, use a column (ideally in Power Query); if you need to aggregate it, use a measure.
Why we use it
Choosing correctly keeps models small and correct. Overusing calculated columns bloats memory and refresh time, while trying to slice by a measure simply does not work.
When to use it
Use a calculated column for row-level attributes needed on axes, slicers or relationships, when Power Query cannot do it. Use a measure for totals, ratios, percentages and anything that must respond to filters. When in doubt, choose a measure.
How it works
- Need a new calculation
- Will you slice, group or join by it? Yes: Create a column (Power Query or DAX). No: Create a measure.
- Is it a ratio or total that must follow filters? Yes: Measure is required. No: Column is acceptable.
- Write and format the expression
- Use it in the right visual well
Syntax
Calculated column: Table tools → New column
Sales[Unit Price] = DIVIDE(Sales[Amount], Sales[Qty])
Measure: Home → New measure
Total Sales = SUM(Sales[Amount])Example
// Calculated column (row context, stored per row)
Price Band = IF(Sales[Amount] >= 1000, "High", "Low")
// Measure (filter context, computed per visual cell)
High Value Sales = CALCULATE([Total Sales], Sales[Price Band] = "High")
// Visual: Region on rows, [High Value Sales]
// North ₹2,700 (1,200 + 1,500) | West ₹1,600 | South blankKey points
- Columns are computed at refresh and stored; measures at query time
- Columns use row context; measures use filter context
- Only columns can go on slicers, axes and relationships
- Measures always return one value per visual cell
- Prefer Power Query columns over DAX calculated columns where possible