Power BI: Calculated Columns vs Measures

Creating a Calculated Column or a “Calculated” Measure in Power BI will both result in a new field that you can use in reports. However, they are different in several ways.

A Calculated Column is evaluated at the row-level and returns/stores one value for each row. For example, if you have the two columns, Revenue and Expenses, you can create a Calculated Column for Profit using the following formula: Profit = Revenue – Expenses. Profit would be calculated for each row during data load and would add a new column to the dataset and be stored with the dataset, and therefore, increase the size of your Power BI model.

A Measure on the other hand, is evaluated across multiple rows. For example, you can sum your entire Revenue column to get Total Revenue. Your formula would be something like: Total Revenue = SUM(Revenue). In the case of measures, they are not new columns in your dataset, but are fields that can be added to visualizations that are calculated at query time when accessed. Therefore, Measures are not stored and do not increase your model size. Measures, such as Total Revenue, will adjust based on the filters applied to the data. For example, if you applied a filter of Year = 2021, then the Total Revenue would be the sum of Revenue for the year 2021, and this is why Measures must be calculated at query time, unlike Calculated Columns whose individual row values are not affected by filters.

Here’s a tabular summary of Calculated Columns vs Measures:

Calculated ColumnsMeasures
Profit = Revenue – Expenses

Calculated for each row
Returns one value per row
Total Revenue = SUM(Revenue)

Calculated in aggregate across multiple (possibly all) rows
Returns a value based on some aggregate across many rows
Adds a new column; is pre-calculated and stored in memory along with the rest of the data; increases model sizeAdds a new field; is not stored in memory but makes use of CPU to perform the calculation; does not increase model size
You can see the results of a Calculated Column as soon as you define it You can see the results of a Measure only after it has been added to a visual and displayed
Calculated at data loadCalculated at query time, such as when a user opens a visualization that includes the field or when the user changes the filters applied to the data being displayed
Column names, including Calculated Columns, must be unique within a table. Different tables may have the same column name.Measure names must be unique across the entire data model. Therefore, tables cannot contain Measures with the same name.
Calculated Columns vs. Measures in Power BI

Generally, since Calculated Columns increase the model size and can degrade performance, unless you intend to use the values from your Calculated Columns as categories or filters in your visualizations, it is better to create Measures.

Thanks for reading. I hope you found this article useful.

Good luck on your analytics journey!

Leave a comment