Power BI DAX

Total Sales measure in Power BI DAX: Example and Tips

Total Sales measure in Power BI DAX: Example and Tips with a plain-English explanation, DAX measure example, Excel comparison, reporting tips, and common mistakes.

💡 Ideas for You

Resources for moving spreadsheet-style calculations into dashboards.

4 useful links
📚 Step-by-step booksStart with beginner-friendly step-by-step books and learning resources from Create & Learn.📉 Power BI DAX guidesBooks and references for measures, model logic, and reporting formulas.📊 Dashboard reporting booksResources for creating clearer dashboards and report layouts.📘 Data modeling resourcesHelpful material for relationships, measures, and model structure.

Quick answer

Total Sales measure in Power BI DAX is a Power BI DAX example for creating reusable calculations in reports. Use it as a measure pattern, then adapt table and column names to your model.

Total Sales = SUM(Sales[Amount])

When to use it

Use this DAX pattern when a spreadsheet-style calculation needs to become a reusable report measure. It is especially useful for KPI cards, tables, matrix visuals, and trend charts.

Step-by-step

  1. Confirm the base columns and relationships in your model.
  2. Create the base measures first, such as Total Sales or Total Cost.
  3. Create the final DAX measure using clear names.
  4. Place the measure in a simple card or table visual to test it.
  5. Check the result with filters, slicers, and different date ranges.

Excel comparison

In Excel, the same logic often appears as a cell formula or PivotTable calculation. In Power BI, the logic should usually be a measure so it responds to filters and slicers.

=IFERROR(B2/C2,0)

Common mistakes

  • Writing one complex measure before testing the base measures.
  • Using a calculated column when a measure would respond better to filters.
  • Forgetting that DAX results depend on filter context.
  • Using / instead of DIVIDE when the denominator may be zero or blank.

Related DAX examples