Averages per customer with AVERAGEX over VALUES
AVERAGE(Sales[Unit Price]) averages order lines. Business questions usually ask for an average per something else: per customer, per day, per product. For that you iterate the distinct values of a column with VALUES, compute the measure for each one, and average the results.
VALUES(Customer[Customer]) returns the customers visible in the cell. Inside AVERAGEX, the measure [Sales Amount] runs once per customer, and context transition turns that customer into a filter. Customers who bought nothing return BLANK, and AVERAGEX skips BLANK.
Your task
Write a measure named Sales per Customer that returns the average Sales Amount per customer who bought something in the cell.
About this exercise
You practise iterating a column, not a table with AVERAGEX and VALUES. 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, Sales per Customer, fills a Power BI-style matrix grouped by Product[Category] and Date[Year]. 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 and Total Cost. Reference them in square brackets, for example [Sales Amount].
Where you start
Sales per Customer =The result to build
| Year | |||
|---|---|---|---|
| Category | 2024 | 2025 | Total |
| Accessories | 1,561.68 | 1,501.75 | 3,063.43 |
| Bikes | 12,795.56 | 11,915.72 | 20,960.60 |
| Clothing | 1,248.72 | 1,122.38 | 2,246.39 |
| Total | 14,184.24 | 12,973.63 | 25,739.45 |
Last updated 10 November 2026
Opening the exercise…