Streak 0 daysPoints 0

Lesson23/59
Clearing a whole table’s filters

Share of all customers with REMOVEFILTERS

New functionsREMOVEFILTERS, DIVIDE
StatusNot started

REMOVEFILTERS(Customer) clears every filter on the Customer table: country, customer and segment. REMOVEFILTERS(Customer[Country]) clears only the country, and a filter on Customer[Customer] stays.

This matrix has two levels, country and customer. A share of all customers needs the whole table cleared; clearing only the country leaves each customer row divided by itself.

Your task

Write Share of Customers: the cell’s Sales Amount divided by the Sales Amount of all customers in the same category.

*1*1*1*1SALEST1 · 420 ROWSSalesKeyNUMOrder DateDATEShip DateDATEProductKeyNUMCustomerKeyNUMQuantityNUMUnit PriceNUMPRODUCTT2 · 8 ROWSProductKeyNUMProductTEXTCategoryTEXTColorTEXTList PriceNUMStandard CostNUMCUSTOMERT3 · 10 ROWSCustomerKeyNUMCustomerTEXTCountryTEXTSegmentTEXTDATET4 · 731 ROWSDateDATEYearNUMQuarterTEXTMonthTEXTMonth NumberNUMNOTES1Filters flow from 1 to *, alongthe arrow: Product filters Sales.2Select a column or a measureto insert it at the cursor.3Measures in this model:[Sales Amount]Key columnFact tableSALES MODEL · STAR SCHEMASHEET 1 OF 1

About this exercise

You practise clearing a whole table’s filters with REMOVEFILTERS 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 Customers, fills a Power BI-style matrix grouped by Customer[Country], Customer[Customer] and Product[Category]. 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 Customers =

The result to build

Expected result for Share of Customers
Category
Country › CustomerAccessoriesBikesClothingTotal
France24.4%20.4%28.6%21.5%
Cycles Marchand21.6%18.3%24.7%19.1%
Léa Moreau2.8%2.1%3.8%2.3%
Germany31.5%35.9%29.3%34.9%
Anna Berger2.8%4.0%6.5%4.1%
Jonas Weber1.0%4.6%5.3%4.3%
Velo Haus27.6%27.2%17.6%26.5%
Netherlands18.1%20.8%9.6%19.6%
Fietsen De Vries15.8%18.7%7.2%17.4%
Sanne Bakker2.3%2.1%2.3%2.2%
United Kingdom26.1%23.0%32.5%24.1%
Emma Clarke0.6%0.5%
Northside Bikes23.7%21.0%31.4%22.1%
Oliver Hughes2.4%1.4%1.2%1.5%
Total100.0%100.0%100.0%100.0%

Last updated 10 November 2026

Opening the exercise…