Ravindra BagaleCourses & study guides मराठी Track your progress

22. Filters and Slicers

Practice and Answer Key: Filters, Slicers and Interactions

Suppose we are checking why a card shows a "strange" number. Use the six orders from the DAX practice (13: Practice and Answer Key):

Order ID City Platform Order Status Amount (₹)
1 Pune Blinkit Delivered 400
2 Pune Blinkit Cancelled 0
3 Mumbai Blinkit Delivered 600
4 Mumbai Amazon Now Delivered 500
5 Nashik Blinkit Delivered 300
6 Pune Amazon Now Delivered 200

About this data: This table uses columns: Order ID, City, Platform, Order Status, Amount (₹). This table uses columns: Step, Card / visual shows. This table uses columns: What you see, Why, Fix. Values shown are the lesson examples already on this page (not a new dataset).

Exercise (one under the other):

  1. Page 1: add cards Total Sales and Total Orders, and a bar chart of Total Sales by City.
  2. Add a page filter Order Status = Delivered. Read both cards.
  3. Add a City slicer. Select Pune. Read both cards.
  4. Clear the slicer. On the bar chart add a Top N visual filter: Top 1 City by Total Sales.
  5. Remove the Top N filter. Add a card State Total. With Edit interactions, set the bar chart, then State Total to None. Click Pune on the chart.
  6. Add page 2 with a Total Sales card. View › Sync slicers: tick page 2 for the City slicer (sync and visible). Select Pune on page 1 and open page 2.

Expected result (check your numbers):

Step Card / visual shows
2. Page filter Delivered Total Sales ₹2,000 · Total Orders 5
3. + Slicer Pune Total Sales ₹600 (400 + 200) · Total Orders 2
4. Top 1 city Only Mumbai, ₹1,100 (600 + 500)
5. Click Pune Total Sales ₹600 · State Total stays ₹2,000
6. Page 2 with synced slicer Total Sales ₹600 (Pune). Page filters do not sync: add the Delivered page filter on page 2 too, or Total Orders shows 3 instead of 2
Answer key (open after you try)
  • Page filter: Filters pane › Filters on this page › drag Order Status › tick Delivered.
  • Top N: select the bar chart › Filters on this visual › City › Filter type Top N › Show items Top 1 › By value Total Sales › Apply filter.
  • Edit interactions: select the bar chart › Format › Edit interactions › on State Total click None.
  • Sync slicers: select the slicer › View › Sync slicers › tick both the sync and the eye box for page 2.

All filters combine with AND: page filter AND slicer AND the click on the chart.

Common mistakes:

What you see Why Fix
Total Orders = 6 after step 2 The filter was put on the wrong page, or on one visual only Put it under Filters on this page
Top N shows Mumbai and Pune Top N set to 2, or "Bottom" chosen Top, 1, by Total Sales
State Total changes on click Interaction left on Filter or Highlight Set it to None
Page 2 ignores the slicer Only the eye box ticked, not the sync box Tick the sync box too

Samajla ka? When a number looks strange, read the Filters pane on all three levels before you touch the formula.

Thodkyaat sangaycha tar (quick recap)

All filters combine with AND; don't forget to sync slicers; and if a visual shows blank, check the Filters pane layer by layer. Got it? Next, on to design principles.