Sub topic 12
Choosing the right filter for the job
This chapter assumes you can build a basic PivotTable, drag fields into the Rows, Columns, Values, and Filters areas, and tell a true Excel date from text that looks like a date. It also assumes you have used the ribbon's contextual tabs (PivotTable Analyze, Slicer, Timeline). Earlier chapters covered report filters, field drop-downs, slicers, and timelines one at a time. This chapter compares them so you can pick the right one for a given report.
The four options
A PivotTable offers four ways to filter. Each one answers a different need.
- Report filter. A field placed in the Filters area. It shows a single drop-down above the PivotTable.
- Field drop-down (label or value filter). The arrow on a Row Labels or Column Labels header. It offers checkboxes, search, label filters, value filters, and date filters.
- Slicer. A floating panel of buttons, one per item in a field. It works with text, numbers, and dates treated as items.
- Timeline. A floating control with a time scale, built only for true date fields.
All four narrow the data the PivotTable summarizes. They differ in visibility, in how many PivotTables they can drive, and in the kind of field they accept.
Comparing the options
| Feature | Report filter | Field drop-down | Slicer | Timeline |
|---|---|---|---|---|
| Current selection visible at a glance | No, "(Multiple Items)" only | No | Yes, selected buttons are highlighted | Yes, the selected range is shaded |
| Works on several PivotTables at once | Only with extra setup or VBA | No | Yes, through Report Connections | Yes, through Report Connections |
| Uses screen space | One row of cells | None | A floating object | A floating object |
| Needs a field in the layout | Yes, in Filters | Yes, in Rows or Columns | No, any source field | No, any date field |
| Supports label, value, and top-N rules | No | Yes | No | No |
| Date fields | Item list | Item list and date filters | Item list | True date ranges with time levels |
| Prints cleanly | Yes, cell based | Yes, cell based | Prints, but takes page space | Prints, but takes page space |
Two rows deserve a note. First, a slicer or timeline does not need its field to be in the PivotTable layout. You can filter by Region without Region appearing anywhere in the report. Second, only the field drop-down offers rule-based filters such as "Top 10" or "Labels begins with". Slicers select items. They do not evaluate rules.
A decision path
Work through these questions in order.
- Is the filter rule-based? If you need "Top 10 customers", "Sales greater than 5,000", or "Names beginning with A", use a field drop-down. Slicers and timelines cannot express those rules.
- Is the field a true date and does the reader want a period? If the question is "show me Q2 of last year" or "March through June", use a timeline.
- Will readers click through choices in a finished report? If yes, and the field has a modest number of items, use a slicer.
- Does one control need to drive several PivotTables? Use a slicer or timeline and set up Report Connections.
- Is the report for you, or a quick analysis with little space? A report filter or field drop-down is enough.
When a report filter is still the better choice
Slicers look better, but they are not always the right tool.
- Large item lists. A field with 500 customers produces a slicer that needs scrolling and is hard to scan. A report filter or the search box in a field drop-down handles long lists better.
- Tight layouts. A report filter occupies one row and moves with the cells. A slicer floats above the grid and can cover data if you do not plan its position.
- Many filters on one report. Eight slicers on a sheet create clutter. Fewer than five controls is a practical limit for most dashboards.
- Report filter pages. The Show Report Filter Pages command creates one worksheet per item of a report filter. Slicers have no equivalent.
- Compatibility. Slicers and timelines need Excel 2010 or later (timelines need 2013 or later). If you share the file with people on an older version, the controls will not work for them.
When a slicer or timeline is the better choice
- Showing the state. A report filter that says "(Multiple Items)" hides what is selected. A slicer highlights each active item, so a reader can tell the filter state without opening anything.
- Readers who are not Excel users. Buttons are easier to learn than drop-down checkboxes.
- Shared filters. One slicer connected to three PivotTables keeps them in step. With report filters you would change each one by hand.
- Date navigation. A timeline lets a reader drag across months or switch to quarters. Using a drop-down to tick 18 individual months is slow and error prone.
Combining filters
The four filters are not exclusive. They combine with AND logic: an item must pass every active filter to appear in the PivotTable. A common layout uses a timeline for the period, a slicer for Region, and a field drop-down with a Top 10 value filter on the Customer rows.
One edge case matters here. A field drop-down filter and a slicer on the same field both act on that field. If you hide items through the field drop-down, the slicer shows those items as unavailable or hides them from the selection. If a slicer seems to ignore your click, check whether another filter on the same field is already excluding the item.
A worked scenario
You maintain a monthly sales report with three PivotTables: sales by product, sales by salesperson, and a trend by month. The source has 24 months of data, five regions, and 300 products. Choose controls for it.
- Period. Use one timeline on the order date field, connected to all three PivotTables.
- Region. Five items fit a slicer. Connect it to all three PivotTables.
- Product. With 300 items, a slicer is too long. Keep Product in the Rows area and let analysts use the field drop-down search box.
- Top performers. Apply a Top 10 value filter on the salesperson field. This is the only rule-based requirement, so it needs the field drop-down.
The result is two floating controls and one built-in filter, which is easy to read and maintain.
Common mistakes
- Using a slicer for a rule. Readers cannot select "the top five" with buttons, because the top five change when the data changes.
- Using a slicer for a continuous date range. A slicer on a date field lists individual dates or months as separate buttons. A timeline selects a range with one drag.
- Forgetting connections. A new slicer connects only to the PivotTable you were in when you created it. The other PivotTables ignore it until you tick them in Report Connections.
- Choosing by looks. Pick the control that fits the question, then format it. Do not add slicers because they look modern.
Exercise
A PivotTable shows 800 customers. A manager wants only the ten customers with the highest sales, and wants the list to update when new data arrives. Which filter should you use, and why not a slicer?
Show answer
Use a field drop-down value filter (Top 10) on the Customer field. It evaluates a rule against the current data, so the list updates on refresh. A slicer only selects fixed items, so you would have to pick the ten customers by hand and re-pick them whenever the ranking changed. An 800-button slicer would also be unusable.
Exercise
Your report has three PivotTables built from one pivot cache, a true date column named Order Date, and a Region field with four values. List the controls you would add and the setting you must change after inserting them.
Show answer
Add one timeline on Order Date and one slicer on Region. After inserting each, open Report Connections and tick the two PivotTables that the control was not created from, so all three respond to it.