Sub topic 7
Filter by Values or by Condition
Assume you know how to select cells, switch between sheet tabs, and recognize a header row. You should also have a slicer connected to a clean sales table. In this chapter, you will configure the slicer so viewers can filter records by selected values or by rules.
Choose a filter mode
Open the slicer by clicking its three-dot menu, then choose Edit slicer. In the editor, confirm the data range and select the column to filter. For example, choose Region, Category, or Revenue.
The slicer has two main filtering approaches:
| Filter mode | What you choose | Example |
|---|---|---|
| Filter by values | Individual values from the column | West and East |
| Filter by condition | A rule that values must satisfy | Revenue is greater than 500 |
Use Filter by values when the list of choices is short and known. Use Filter by condition when the list is long, changes often, or needs a comparison.
Filter by values
Choose Filter by values in the slicer editor. Google Sheets displays the distinct values found in the selected column. Clear Select all, then check the values you want to keep.
For example, a Region slicer might contain:
- East
- North
- South
- West
Selecting only East and West makes connected pivot tables and charts show those regions. Selecting multiple values applies an OR rule: a row remains visible if its region is East or West.
The value list can include a blank entry. A blank usually means that the source row has no value in that column. If blanks represent incomplete data, clear the blank entry. If blank values are meaningful, keep it selected.
Filter by condition
Choose Filter by condition to create a rule. The available conditions depend on the selected column. Text columns can use conditions such as Text contains, Text starts with, or Text is exactly. Number columns can use Is greater than, Is less than, or Is between. Date columns can use date comparisons and date ranges.
For a sales dashboard, you could configure these conditions:
- Select the
Revenuecolumn. - Choose Filter by condition.
- Choose Is greater than.
- Enter
500. - Click OK.
The slicer now keeps rows whose revenue is greater than 500. A condition does not permanently remove data. It changes which rows connected objects use while the slicer is active.
Combine slicers and conditions
You can add more than one slicer. For example, one slicer can filter Region by selected values while another filters Order Date by a date condition.
When multiple slicers filter the same pivot table or chart, a row must satisfy every active slicer. This is an AND relationship:
- Region is West
- Category is Hardware
- Revenue is greater than 500
Only rows meeting all three rules remain in the connected summary.
Check the result
After changing a slicer, inspect a connected pivot table. Confirm that its totals and row labels changed as expected. Then check the chart. If the chart did not change, it may not use the same source range or may not be connected to that slicer.
Remember that a slicer does not automatically change every formula on the sheet. Ordinary SUM or COUNT formulas usually continue to calculate the full range. Formulas that need to follow the visible filtered rows require a filtering-aware design, such as SUBTOTAL.
Exercise
You need a dashboard showing only West-region Hardware orders with revenue above 500. Which slicer settings should you use?
Show answer
Use a Region slicer with only West selected, a Category slicer with only Hardware selected, and a Revenue slicer using the condition Is greater than 500. Ensure all three slicers control the target pivot table and chart.