Filter a Pivot Table by Date: Step-by-Step
In this article
Filtering a pivot table by date lets you focus on a specific time period—like this month, last quarter, or a custom range—without rebuilding the table. This guide works for Excel and Google Sheets, covering both the automatic date grouping and manual date filters. You'll need a pivot table already created from a dataset that includes a column with real dates (not text), and you should be comfortable with basic pivot table navigation.
What You'll Need
- A pivot table already inserted in Excel or Google Sheets.
- The source data must include a column formatted as dates (e.g., 01/15/2024, not "Jan 15").
- That date column must be added as a row or column field in the pivot table.
- Basic familiarity with pivot table field lists and context menus.
Step-by-Step
- Ensure your date column is in the pivot table. If you haven't added it yet, drag the date field from the field list into the "Rows" or "Columns" area. In Excel, dates often auto-group into years, quarters, and months—that's fine.
- Click the dropdown arrow next to the date field. In Excel, this arrow appears in the pivot table header (e.g., "Row Labels" or the date field name). In Google Sheets, click the filter icon in the pivot table's date column header.
- Choose the date filter type. In Excel, select "Date Filters" from the dropdown menu. In Google Sheets, click "Filter by condition" and then choose a date rule like "Date is before" or "Date is after."
- Pick a preset or custom range. Excel offers presets like "This Month," "Last Quarter," or "Year to Date." For a custom range, select "Between" and enter the start and end dates. In Google Sheets, use "Date is between" and type the two dates.
- Apply the filter. Click OK (Excel) or Done (Google Sheets). The pivot table will now show only data within the selected date range.
- Clear the filter when needed. Go back to the same dropdown, choose "Clear Filter" (Excel) or "Clear" (Google Sheets) to remove the date restriction.
Common Mistakes
- Dates stored as text: If your date column isn't recognized as dates, the filter options will be limited or missing. Fix by converting text to dates (Excel: Text to Columns > Date; Sheets: Data > Split text to columns > Date).
- Filtering the wrong field: Make sure you're clicking the filter on the date field, not on a value field like "Sum of Sales."
- Auto-grouping confusion: Excel may group dates into months and years, so a filter on "Month" only affects that month, not the entire date range. Check the field settings if you want to filter on the full date.
- Including blank dates: If some rows have blank dates, they won't appear when a date filter is active. That's expected, but it can look like data is missing.
Tips
- Use Excel's "Between" filter for precise ranges—it's the most flexible and works for any period.
- In Google Sheets, you can use custom formulas in the filter, like
=A2>DATE(2024,1,1)for more control. - If you frequently need the same date range, create a Slicer (Excel) or a Pivot Table date filter (Sheets) for one-click filtering.
- Keep your source data as a proper Excel Table (Ctrl+T) or named range—this makes the pivot table refresh automatically when you add new dates.
- Remember that filtering by date doesn't change your source data; it only hides rows in the pivot table.
Troubleshooting
No date filter options appear: This usually means Excel or Sheets doesn't recognize your column as dates. Select the column in the source data, go to Format > Number > Date (or the equivalent), and ensure all cells are valid dates. Then refresh the pivot table (right-click > Refresh).
Filter shows "(All)" but data isn't filtered: Check that you applied the filter to the correct field. Also, if you have multiple date fields (e.g., Order Date and Ship Date), make sure you're filtering the one that's actually in the pivot table.
Date range includes extra days: If you select "Between" and enter 01/01/2024 and 01/31/2024, the filter includes both endpoints. That's correct, but if you see dates outside that range, verify the date format—e.g., 01/02/2024 might be interpreted as February 1 in some regional settings.
Filter disappears after refresh: In Excel, refreshing the pivot table can sometimes clear filters if the source data changed significantly. Reapply the filter after refreshing. In Google Sheets, filters usually persist, but check if the date column header still shows the filter icon.
Grouped dates filter incorrectly: If Excel has auto-grouped dates into months, filtering by "Month" only shows that month's data, not the entire quarter. To filter by a full date range, right-click the grouped field, choose "Ungroup," then apply a "Between" filter on the ungrouped dates.
Frequently Asked Questions
Q: Can I filter by date range without grouping into months?
A: Yes. In Excel, right-click the date field, select "Ungroup," then use the "Between" date filter. In Google Sheets, the pivot table doesn't auto-group, so you can filter directly by exact dates.
Q: How do I filter for the last 30 days dynamically?
A: In Excel, use the "Date Filters" > "In the last" option and enter 30 days. In Google Sheets, you can use a custom formula like =A2>=TODAY()-30.
Q: Why does my date filter show years but not months?
A: That's Excel's auto-grouping. Right-click the date field, choose "Group," and select both "Months" and "Years" to see both levels. Then you can filter at either level.
Q: Can I filter by date in a pivot table that has no date field?
A: No. You must add a date column to the pivot table first. If your source data has dates, drag that field into the Rows or Columns area before filtering.
Q: Does filtering by date affect other pivot tables?
A: No, each pivot table has its own filters. Filtering one doesn't change another, even if they share the same source data.
Q: How do I remove a date filter?
A: Click the dropdown arrow on the date field, select "Clear Filter" (Excel) or "Clear" (Google Sheets). The pivot table will show all dates again.