DAX: columns, measures and totals
Listen to this lesson
Nigerian voice narration
Fictional training case. The cleaned, modelled data is in Power BI. Now management wants numbers: total consumption, total billed, total collected, total outstanding — and they want each to recalculate when they click a district. Those live, filter-aware calculations are measures, written in DAX. This lesson teaches the difference between calculated columns and measures, and your first five measures.

Calculated column versus measure
A calculated column computes a value per row at refresh time — like Outstanding = Billed − Paid on each bill. A measure computes on the fly over whatever rows are currently filtered — Total Billed = SUM(Billing[Billed]). Columns live in the table; measures live in the filter context.

Try it yourself — step by step
- Select the Billing table and click New measure.
- Type Total Billed = SUM(Billing[Billed]) and press Enter.
- Create Total Paid the same way.
- Type Collection Rate = DIVIDE([Total Paid],[Total Billed]) and format as %.
- Drag each measure onto a Card visual.
Your first measures
Right-click the fact table → New measure. Total Billed = SUM(Billing[Billed]). Total Collected = SUM(Billing[Paid]). Total Consumption = SUM(Billing[Consumption_kWh]). Measures appear in the Fields pane with a calculator icon.
Derived measures
Outstanding Balance = [Total Billed] − [Total Collected]. Collection Efficiency = DIVIDE([Total Collected], [Total Billed]) — DIVIDE avoids division-by-zero errors. Building measures from measures keeps logic in one place.

Build the prompt from three phrases — Role, Task and Format — and watch the AI answer.
The filter context magic
Drop Total Billed on a card visual: it shows the company total. Add a district slicer and click Jos — the same measure now shows Jos only. One formula, infinite questions answered. That recalculation is why measures, not columns, drive dashboards.
Common mistakes to avoid
Beginners often build everything as calculated columns, then wonder why the numbers do not change when a slicer is clicked — filtered totals must be measures. Another is dividing with the / operator and getting infinity errors on empty districts; DIVIDE handles that gracefully. A third is never verifying a measure against the raw data: pick one district, compute its total by hand or in Excel, and compare once before the dashboard goes to management.
Your practice
Create the five measures — billed, collected, consumption, outstanding, collection efficiency — on the sample data. Put them on card visuals, add a district slicer, and click through districts watching every card update. Verify one district's total against the raw data.
You are a DAX tutor. Write the five measures for a Billing table: total billed, total collected, total consumption, outstanding balance and collection efficiency (safe against division by zero), each with a one-line explanation.
Answer all three questions and check your answers to unlock the next lesson. Pass mark: 2 of 3.
Outstanding balance per bill row is best as…
DIVIDE([Total Collected],[Total Billed]) is safer than the / operator because…
Collection efficiency tells management…
