Totals that don’t add up
The measure below multiplies the total quantity by the average price. On a single order line that is right; on any group it is wrong, because a total of products is not a product of totals. Discounts and different products make it worse in the subtotals.
Whenever the value is defined per row (quantity times price), compute it per row and add up: an iterator, not two aggregations multiplied.
Your task
Fix Revenue so that every row, subtotal and total is the sum of quantity times unit price over the sales lines.
About this exercise
You practise fix a product of two totals with SUMX. The exercise runs on a small bike-shop model with a Sales fact table and Product, Customer and Date dimensions, the same star schema in every lesson.
Your measure, Revenue, fills a Power BI-style matrix grouped by Product[Category] and Product[Product]. As in a real report, each cell evaluates the measure in its own filter context, and the subtotals and the grand total are evaluated again in theirs rather than added up. When you check your answer, every cell is compared with the expected value, wrong cells are marked, and the hint is about the mistake you made.
Measures that already exist in the model: Sales Amount. Reference them in square brackets, for example [Sales Amount].
Where you start
Revenue = SUM(Sales[Quantity]) * AVERAGE(Sales[Unit Price])The result to build
| Category › Product | Revenue |
|---|---|
| Accessories | 27,570.90 |
| Bike Lock | 7,015.10 |
| Helmet | 17,350.90 |
| Water Bottle | 3,204.90 |
| Bikes | 209,606.00 |
| City Bike | 62,726.00 |
| Road Bike | 78,540.00 |
| Trail Bike | 68,340.00 |
| Clothing | 20,217.55 |
| Cycling Jersey | 10,245.35 |
| Rain Jacket | 9,972.20 |
| Total | 257,394.45 |
Last updated 10 November 2026
Opening the exercise…