Menu

Calculated Columns vs. Measures

Calculated Columns vs. Measures

Calculated columns and measures are two of the most important concepts in DAX.

Although both use DAX expressions, they behave differently.

What Is a Calculated Column?

A calculated column creates a value for each row of a table. Its results are stored in the model and can be used in slicers, axes, filters, and grouping.

For example:

SalesAmount = Sales[Quantity] * Sales[UnitPrice]

If the Sales table contains 1,000 rows, this calculated column produces a value for each row.

Calculated columns are useful when you need row-level classifications or values that can be grouped and filtered.

Examples include:

  • Full customer names.
  • Product classifications.
  • Revenue per transaction.
  • Year extracted from an order date.

What Is a Measure?

A measure calculates a result when it is used in a visual or evaluated in a particular filter context.

For example:

Total Sales = SUM(Sales[SalesAmount])

The result changes depending on the filters applied to the report.

If the user selects a particular product category, the measure calculates sales for that category rather than necessarily returning the total for all categories.

Measures are commonly used for aggregations and business metrics.

Examples include:

  • Total revenue.
  • Average sales.
  • Total quantity sold.
  • Profit margin.
  • Percentage of total sales.

Key Differences

Feature

Calculated Column

Measure

EvaluationRow by row during model processing or recalculationWhen the calculation is evaluated
StorageValues are stored in the modelThe result is calculated rather than stored as a value for every row
Responds to report filtersThe column values remain fixed until recalculated, but can be filteredYes, according to the measure and filter context
Common useRow-level values and categoriesAggregations and dynamic metrics

When Should You Use Each?

Use a calculated column when each row needs its own value, such as a category derived from a transaction amount.

Use a measure when you need a calculation that responds dynamically to report filters, such as total sales for a selected region.

For most aggregate business calculations, measures are usually the preferred choice because they avoid storing a separate result for every row.


Power BI Tutorial

VA

Vishalini A



Learn via Video Course

Microsoft Power BI Logo

Microsoft Power BI

3 hrs



Get in Touch For Details