Back to BlogsPower BI

Power BI Measures vs Calculated Columns: A Sales Example

Anuj Singh (Admin) 14 September 2026 11 views

A calculated column and a measure can contain similar-looking DAX but serve different purposes. A column adds a value to rows in a table. A measure calculates a result in the current filter context, such as the product category or month selected in a report. Begin with the question the visual must answer.

Create a row-level amount only when you need it

If Sales has Quantity and UnitPrice, a line amount can be calculated for each row. In an Import model, a calculated column is computed during processing and stored in the model. It does not recalculate its row values merely because a slicer selection changes.

LineAmount = Sales[Quantity] * Sales[UnitPrice]

Total Sales = SUM(Sales[LineAmount])

-- Alternative: calculate the row expression inside a measure
Total Sales Without Column =
    SUMX(Sales, Sales[Quantity] * Sales[UnitPrice])

Let measures respond to the report question

The Total Sales measure sums the rows visible under the current filter context. Place product category on a visual and the measure returns a result for each category. A relationship and slicer can change which rows participate without changing the definition of the measure.

Avoid summing ratios

If the question is average selling price per unit, divide total sales by total quantity using a measure. Averaging row prices gives each line equal weight, which may answer a different question. Use DIVIDE for a defined response to a zero denominator rather than allowing an unhandled division.

Total Quantity = SUM(Sales[Quantity])
Average Price Per Unit = DIVIDE([Total Sales], [Total Quantity])

Check the total row independently

A measure total is evaluated in the total row context; it is not always a sum of the displayed cells. For ratios, that is often the correct behavior. Test two lines with different quantities and prices, calculate the weighted result manually, and compare it with the visual.

Choose for meaning, then consider storage

A column is useful for a stable row attribute used in grouping or filtering. A measure is useful for aggregations that depend on the current report context. Avoid storing many derived columns simply because they feel easier; model size and refresh cost can grow. Conversely, do not force an ordinary category label into an aggregation.

Practice and check your understanding

Use one line with quantity 2 at price 100 and another with quantity 1 at price 400. Confirm total sales 600 and average price per unit 200. Explain why the simple average of the two prices is a different answer.

Continue learning

Explore the related Code Hacker course syllabus for structured learning. Then read Power BI Star Schema: Define the Grain Before Relationships to connect this exercise to the next skill.

Reference

Microsoft measures documentation provides the underlying API or technical guidance. Check the documentation for the version you use; examples here are small learning exercises rather than complete production implementations.

Found an issue with this guide? Send a correction with the article URL and your example. About our learning material.

Topics in this article

  • power bi
  • dax
  • measures
  • calculated columns

Want to Learn This Practically?

Subscribe to Code Hacker and get hands-on access to 40+ premium courses — Ethical Hacking, Kali Linux, Metasploit, Network Hacking, Bug Bounty & more!