Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2010: Pivot Table Filter - Showing Dates Past, not Included in Current Data 1

Status
Not open for further replies.

kjv1611

New member
Jul 9, 2003
10,758
US
This isn't a big issue, but I'm hoping to sort it out.

In one Excel 2010 workbook, I've got:
One main data pull from SQL
Another MSQuery Data pull based off the SQL Data, to a separate worksheet
One Pivot table off of each of the data pulls (tables)

In the pivot that is based off the original SQL data table, we are seeing that a date field there is showing old dates in the filter (when you click on the drop-down for the Date field in the pivot table in order to filter by it). So, today, it's still showing dates from August, though there is nothing older than 9/16 in the data.

The field I'm trying to filter off of is under Column Labels, not Row Labels, in case that helps.

Any idea how a pivot table still shows old values to filter (even though has been refreshed multiple times), and those values it gives as options are found nowhere within the original data?

Is there a separate refresh option / command for filters??

Thanks for any thoughts.



"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Steve,

I think that xlbo's post in thread68-642152 that has VBA code should do the trick!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thank you! Thank you! I just figured this was an odd-ball situation, but apparently not. Thanks for sharing the link! xlboo's solution did the trick.

I did add a refresh to it, b/c I noticed that the change wasn't visible w/o a refresh. So now it's:
Code:
[GREEN]'Clean Up Pivot Caches, Make Pivot Charts not show empty/missing records
'From thread: [URL unfurl="true"]http://www.tek-tips.com/viewthread.cfm?qid=642152[/URL][/GREEN]

Sub FixPivotCharts()
    Dim pc As PivotCache
    For Each pc In ActiveWorkbook.PivotCaches
        pc.MissingItemsLimit = xlMissingItemsNone
        pc.Refresh
    Next pc
    If pc Is Nothing Then Else Set pc = Nothing
End Sub

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top