PivotTable - Show Range of Dates

MWilliams

Board Regular
Joined
Jan 29, 2010
Messages
97
I'm sorry I don't know the best way to explain this...

I have a list of jobs with the dates they were Submitted and the dates they were Completed. I have formulas telling me how many of each occurred in the last 30 days.

=COUNTIF(JobList!$B6:B500,">" & TODAY()-30) - COUNTIF(JobList!$B6:$B500,">" & TODAY())

I'm trying to put a dashboard together and have started playing with Slicers, which seem very nice. I can't figure out how to filter my pivottable to show the data for the last 30 days, though.

My experience with pivot tables & charts is limited and even more limited when it comes to slicers...
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Which area of the PivotTable are your PivotFields with Date Submitted and Date Completed placed?
Are they in the Report Filter (PageField), RowField or ColumnField?
 
Upvote 0
Thanks for the reply,

Right now, I just have them under Row Labels, but I could live with Column Labels, too.

I can summarize the values to show the Min and Max of these dates which will show me the oldest and most recent dates, but I'm trying to get the last 30 days.

Thanks again
 
Upvote 0
Well, I ended up just fudging it and now have what I needed.

I just made a separate pivottable of my formulas, so I ended up with essentially the exact same data in multiple cells, but those are 'source' sheets for my dashboard, so that's alright.
 
Upvote 0
Good to hear you got it to work.

For Dates in the Row Labels area, these are two alternatives to consider.

1. You can Filter the PivotField for a date range.
Right-Click on a Date label> Filter > Date Filters > Show items for which the date: > is after > (enter a date).
There are a lot of date filter options like "This Month", "This Year", but unfortunately there isn't one that you can set to "Last 30 Days".
You could make a fairly simple macro using the macro recorder to do the manual steps above then substitute a specific date with a variable that will evaluate to today-30 days.

2. Add a column named "Last 30 Days" to your data source with a formula for each row that will evaluate to "Yes" if that row's Submitted or Completed Date was within the last 30 days. Then add this "Last 30 Days" field as a Page Filter and set the filter show only "Yes" data. You'll just need to refresh the pivottable to have the Yes/No values updated in the Pivot Cache based on today's date.
 
Upvote 0
2. Add a column named "Last 30 Days" to your data source with a formula for each row that will evaluate to "Yes" if that row's Submitted or Completed Date was within the last 30 days. Then add this "Last 30 Days" field as a Page Filter and set the filter show only "Yes" data. You'll just need to refresh the pivottable to have the Yes/No values updated in the Pivot Cache based on today's date.

I thought about this option, but I'm not sure how to use it. I even went as far as creating two more columns for Days Since Submitted and Days Since Completed, thinking I could filter on Less Than or Equal To but I haven't played with it enough yet.

Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,217,384
Messages
6,136,274
Members
450,001
Latest member
KWeekley08

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top