Filter an Excel Pivot Table for Upcoming Dates
By ddalgleish
Filter Dates in a Pivot Table
In a pivot table, you can add a date field to the Page area, and filter the pivot table, so it shows the results for a specific date.
Sometimes though, you'd like to show dates in a specific range, instead of just a single date. For example, you might like to show orders with ship dates in the future.
- You could manually hide all the past dates in the Ship Date page field, but that might take quite a while if there are lots of dates.
- Another option is to add a field to the source data, and add it to the pivot table, as a filter.
In this hub we'll look at both solutions.
Pivot Table Date Filter
Hiding Items in a Pivot Table Filter
To hide some of the items in a pivot table's page field filter, you can change the field's settings.
- Double-click on the page field button.
- In the PivotTable Field dialog box, click on dates in the Hide Items list.
- Click OK to close the dialog box.
Hide Items
Add a Field to the Source Data
For some filtering problems, the best solution is to add a column to the source data.
In this case, we'll add a column named ShipLater, and use a formula to test if the ship date is later than today's date.
Source Data
Add a Formula to Check the Date
- In the source data table, add a column with the heading ShipLater. In this example, a blank column was inserted to the right of column A.
- In the first data row of the new column, enter a formula that refers to the ShipDate in that row. Our formula is in cell B2, and will check the Ship Date in cell A2, and see if it is greater than today's date.
=A2 > TODAY()
Add a Formula
Copy the Formula Down
- Select cell B2, that contains the formula.
- Point to the fill handle, at the bottom right of the cell.
- When the pointer changes to a small black plus sign, drag down, or double-click, to copy the formula down to the last row of data.
Fill Down
Add Field to Pivot Table
Refresh the pivot table, and add the ShipLater field to the page area.
Add Field to Pivot Table
Filter the Pivot Table
From the ShipLater page field dropdown list, select TRUE.
Filter the Pivot Table
Refresh the Pivot Table
Remember to refresh the pivot table each day to see the current calculations for the ShipLater field.
To manually refresh the pivot table, right-click on a cell in the pivot table, then click on Refresh Data.
Refresh the Pivot Table
Automatically Refresh the Pivot Table
Instead of manually refreshing the pivot table, you can set it to automatically refresh when you open the Excel file.
- Right-click on a cell in the pivot table
- Click Table Options
- In the Data Options section, add a check mark to Refresh on Open
- Click OK to close the dialog box.
Automatically Refresh on Open
Pivot Table Tips
For more pivot table tips, please visit my Excel Tips and Tutorials website.
Excel 2007 Date Filters
My Pivot Table Books
![]() | Amazon Price: $19.09 List Price: $34.99 |
![]() | Amazon Price: $22.46 List Price: $39.99 |
![]() | Amazon Price: $20.28 List Price: $34.99 |
My Pivot Table Video Tutorials
More of My Excel Hubs
- How to Fix Blank Cells Before Sorting in Excel
Blank cells could be putting your Excel data at risk! Some Excel worksheets have cells that were left blank, to make the headings and subheadings easier to read. For example, in the screen shot... - 2 years ago
- Organize Data in an Excel 2007 Table
In Excel 2007, the formatted Excel Table feature makes it easier for you to sort and filter your data, and to scroll through thousands of rows. An Excel Table expands when you add new data, so it can be used as the source for a Pivot Table, and new data will automatically when you update the pivot table. - 2 years ago
- Holiday Dinner Planner in Excel
In Excel Dinner Planner, select a time to eat dinner, and enter the menu items. Excel will create a timetable, to help you stay organized, and have dinner ready on time. - 2 years ago
No comments yet.


