How to Insert a Filter on a Pivot Table
In this article
To insert a filter on a pivot table, you use the filter drop-downs in the row or column labels area, or add a filter field to the Filters area. In Excel, click the drop-down arrow next to the field name in the pivot table, choose the items you want, and click OK. In Google Sheets, use the filter icon in the pivot table editor. The exact steps depend on your spreadsheet app and whether you want to filter rows, columns, or the whole table.
What You'll Need
- A spreadsheet application that supports pivot tables (Excel, Google Sheets, or similar). The steps below focus on Excel and Google Sheets, the most common tools.
- An existing pivot table with at least one field in the Rows or Columns area.
- Basic familiarity with your app's pivot table interface. Menu labels can differ slightly by version, device, or region.
Step-by-Step
- Select your pivot table. Click anywhere inside the pivot table. This activates the PivotTable Tools tabs in Excel or opens the pivot table editor in Google Sheets.
- Locate the filter drop-down. In Excel, each field name in the Rows or Columns area has a small drop-down arrow. In Google Sheets, the pivot table editor shows filter sections for each field.
- Open the filter menu. Click the drop-down arrow next to the field you want to filter. A menu appears with sorting options and filter choices.
- Choose your filter type. In Excel, you can select specific items from the list, or use Label Filters or Value Filters for more advanced conditions. In Google Sheets, use the Filter by values section to check or uncheck items, or set conditions.
- Apply the filter. Make your selections and click OK (Excel) or close the editor (Google Sheets). The pivot table updates to show only the matching data.
- Add a report filter (optional). In Excel, drag a field into the Filters area (also called the report filter area) to create a top-level filter that applies to the entire pivot table. In Google Sheets, add a field to the Filters section in the pivot table editor.
- Clear or change the filter. To remove a filter, reopen the drop-down and choose Clear Filter (Excel) or uncheck the filter in the editor (Google Sheets).
Common Mistakes
- Filtering the source data instead of the pivot table. Applying a filter to the original data range does not automatically update the pivot table unless you refresh it. Always filter through the pivot table's own controls.
- Forgetting to refresh. If you change the source data, the pivot table may not reflect the new filter until you refresh it. In Excel, right-click the pivot table and choose Refresh; in Google Sheets, the pivot table updates automatically.
- Using the wrong filter type. Label filters work on text, while value filters work on numbers. Using the wrong one can give unexpected results.
- Overlooking the Filters area. A report filter applies to the whole pivot table, while a row or column filter only affects that field. Mixing them up can lead to confusing results.
- Not checking for blank cells. Filters may hide blanks by default. If you need to see blanks, make sure to include them in your selection.
Tips
- Use slicers in Excel for a more visual way to filter pivot tables. Slicers are available on the PivotTable Analyze tab (or Insert > Slicer). They let you click buttons instead of drop-downs.
- Name your pivot table (Excel: PivotTable Analyze > PivotTable > Table Name) to make it easier to reference in formulas or macros.
- When filtering by value, remember that the filter applies to the summarized values, not the individual records. For example, filtering sales amounts greater than 1000 will show only categories whose total sales exceed 1000.
- In Google Sheets, you can filter by condition (e.g., text contains, date is before) for more flexibility than simple checkboxes.
- To filter multiple fields, apply filters one at a time. The pivot table will show only rows that meet all conditions.
Troubleshooting
- Filter drop-down is missing: Make sure you have a pivot table selected, not a regular range. If the drop-down still doesn't appear, check that the field is in the Rows or Columns area, not just in Values.
- Filter doesn't change the data: Refresh the pivot table. In Excel, right-click and choose Refresh. Also check that you are filtering the correct field.
- Filter options are grayed out: This can happen if the pivot table is based on an external data source that is not available, or if the workbook is in a protected view. Enable editing and ensure the data connection is active.
- Filter removes all data: You may have selected a filter condition that matches no records. Clear the filter and try a broader condition.
- Google Sheets filter not working: Ensure the pivot table editor is open and you are editing the correct pivot table. If the editor doesn't show filter options, try refreshing the browser page.
Frequently Asked Questions
Can I filter a pivot table by multiple criteria?
Yes. In Excel, use Label Filters or Value Filters and combine conditions with AND/OR. In Google Sheets, you can add multiple filter conditions in the pivot table editor.
How do I filter a pivot table to show only the top 10 items?
In Excel, click the drop-down for the field, choose Value Filters > Top 10, and set the number. In Google Sheets, use the Filter by condition option and select Is top N.
Why does my pivot table filter not update when I change the source data?
Pivot tables do not refresh automatically in Excel. Right-click the pivot table and choose Refresh, or press Alt+F5 (Excel for Windows). In Google Sheets, the pivot table updates automatically.
Can I use a filter to hide blank rows in a pivot table?
Yes. In the filter drop-down, uncheck the (blank) option. In Google Sheets, uncheck the blank checkbox in the filter list.
What is the difference between a report filter and a row filter?
A report filter (Excel) or Filters area (Google Sheets) applies to the entire pivot table and appears above it. A row or column filter applies only to that specific field and affects only the rows or columns for that field.
Can I filter a pivot table on a Mac?
Yes. The steps are similar to Windows Excel. Click the drop-down arrow in the pivot table and choose your filter options. Menu labels may differ slightly.