Share of the visible total with ALLSELECTED
Reports have slicers. This matrix is sliced to Bikes and Clothing, and a share should be of what the reader sees, not of every sale including accessories.
ALLSELECTED() clears the filters the matrix itself adds (its rows and columns) but keeps the slicers. ALL() or REMOVEFILTERS() clear the slicers too, and the shares stop adding up to 100%.
Your task
Write Share of Visible: the cell’s Sales Amount divided by the matrix’s grand total, respecting the category slicer.
About this exercise
You practise totals that respect slicers with ALLSELECTED and DIVIDE. 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, Share of Visible, fills a Power BI-style matrix grouped by Customer[Country] 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. Reference them in square brackets, for example [Sales Amount].
Where you start
Share of Visible =The result to build
Slicer: Category is Bikes, Clothing
| Year | |||
|---|---|---|---|
| Country | 2024 | 2025 | Total |
| France | 12.2% | 8.9% | 21.1% |
| Germany | 14.6% | 20.7% | 35.3% |
| Netherlands | 8.6% | 11.1% | 19.8% |
| United Kingdom | 14.0% | 9.8% | 23.8% |
| Total | 49.4% | 50.6% | 100.0% |
Last updated 10 November 2026
Opening the exercise…