The key difference between calculated columns and measures in Power Pivot (and Power BI) lies in how, when, and where they are evaluated—specifically in terms of row context vs filter context, performance, and use cases.
1. Definition and Usage
-
Calculated Column:
A DAX expression that is evaluated row-by-row within a table. The result is stored in the data model like a physical column.
Use when you need to:
-
Categorize data (e.g., IF([Sales] > 1000, "High", "Low"))
-
Create relationships between tables using new keys
-
Use column-level filtering in slicers or visuals
-
Measure:
A DAX formula that is evaluated on-the-fly based on the filter context of the visual. It does not store results in the model.
Use when you need to:
-
Aggregate data dynamically (e.g., SUM([Sales]))
-
Respond to user selections (e.g., slicers, filters)
-
Build KPIs, totals, averages, or complex calculations
2. Context: Row vs Filter
3. Storage and Performance
-
Calculated Columns consume more memory, as values are stored.
-
Measures are lightweight and dynamic, calculated only when needed in visuals.
Best Practice: Use measures wherever possible to reduce model size and improve performance.
4. Evaluation Timing
-
Calculated Column: Computed during data refresh or model load.
-
Measure: Computed at runtime, during report interaction.