Sub topic 12
Choosing the right filter for the job
This chapter assumes you can build a PivotTable, you know the difference between text and true date values, and you have inserted a slicer and a timeline at least once. Excel offers four ways to filter a PivotTable. Each fits a different situation.
What each filter does well
| Filter | Best at | Limits |
|---|---|---|
| Report filter | Saving space. One cell sits above the table and can hold many items. | The current choice is easy to miss, and it cannot be shared between PivotTables without VBA. |
| Field drop-down | Label filters ("begins with"), value filters (Top 10, "greater than"), and searching long lists. | The state is hidden behind a small funnel icon. |
| Slicer | Showing the current selection as buttons. One slicer can drive several PivotTables. | It filters by item only. It takes screen space, and a field with hundreds of items makes a long list. |
| Timeline | Filtering a date field by year, quarter, month, or day with a draggable bar. | It needs a true date field, and you can have one timeline per date field. |
Only the field drop-down can filter by a rule, such as "sales above 10,000" or "customer names starting with A". Slicers and timelines pick items or periods and cannot apply a rule.
A way to decide
Ask these questions in order.
- Is the field a date? If the data holds true dates and the user wants periods, use a timeline.
- Do you need a rule rather than a pick list? Use the field drop-down.
- Should several PivotTables react to the same choice, or should readers see the current choice at a glance? Use a slicer.
- Is space tight, and is this a working analysis rather than a finished report? Use a report filter.
Combining filters
The filters do not exclude each other. They work together, and an item must pass every filter to appear. A common pattern is a timeline for the period, a slicer for Region, and a Top 10 value filter on Customer. The slicer and timeline stay visible on the report, and the rule filter stays inside the table.
Three practical checks
- Count the items. Slicers with more than about 15 items get hard to use. Prefer a drop-down with search, or a slicer with several columns.
- Think about the reader. People who do not know Excel find buttons easier than drop-downs.
- Check for conflicts. A manual filter on a field and a slicer on the same field both apply. If the slicer seems to hide items, look for a filter set on the field drop-down.
Practice
Exercise
A sales report has a Date column, a Region column with 4 items, and a Customer column with 800 items. The manager wants to pick months, switch regions with one click, and list only customers whose total sales exceed 50,000. Which filter would you use for each need?
Show answer
Use a timeline for months, because Date is a true date field and the manager picks periods. Use a slicer for Region, because there are only 4 items and the current choice stays visible. Use a field drop-down value filter ("Greater Than" 50,000) on Customer, because it is a rule and 800 items would make a slicer unwieldy.
Exercise
You added a Region slicer and a Top 10 filter on Customer. Some regions you expect to see are missing from the slicer's buttons. What is the likely cause?
Show answer
The Top 10 filter on Customer removes rows before the slicer is built, so regions that have no remaining customers are not shown as active. Clear or adjust the Customer filter, or check the slicer setting for showing items with no data.