I have a consolidated function for refreshing all pivotcaches (done first looping through all caches)and then applying filters to pivottables as needed (looping through pivottables to do so). The filtering portion worked 5 days ago but appears to be broken at this point.
Sample:
what can i do:
-add data to source and see pivot table get updated with new data.set the values filters
-create new pivot table off same source within same file- but get the same limitation
- go back to a version of the file from 5 days ago and see the date filter option enabled and the date filter is set. what is different about the two files at this point I dont know.
--source data worksheet is unprotected and there are no locked cells involved on the listobject that is the source data.
--worksheet where pivottable resides is also unlocked, and there are no other sheets with pivot tables referencing the data.
both files (not working from today and working from 5 days ago) are .xls docs in compatibility mode.
maybe this is because I opened file via 2003? ...we have read-only users who would view the spreadsheet from 2003. I was using pivot tables to gather/compute the data (when run against win 2010 or 2007) and then displaying it for the 2003 crew by paste values. meanwhile the same file needs to be able to retain the functionality so that next time it can compute again. Recently have been doing the checking to see they were ok.
pt.PivotFields("Date Closed").PivotFilters.count = 0, so no filters exist on the field in question
seems like the problem is at a higher level because several of the pivotfilters appear to be having similar problem
officialdate is getting populated with a date- I can see that so its just a matter of applying the filter- which like I said- worked before...hmmm.
going manually to the report filters - Date filters appears to be grayed out....I want to check on what type of value the filed is supposed to be, but under field settings I dont see format number button.
any explanation/help would be appreciated- thank you
Sample:
Code:
With pt 'pivottable object is defined by looping through all pivottables
'On Error Resume Next 'I did this in case no values exist for a field in the range I filter upon- have commented out to trobuleshoot
If .Name = "IssuesOpenedToday" Then
With .PivotFields("Date Opened")
.ClearAllFilters
'NEXT LINE- ERROR OCCURS-Object or application -defined error
.PivotFilters.Add Type:=xlDateBetween, Value1:=officialdate & " 12:00:00 AM", Value2:=officialdate & " 11:59:59 PM"
End With 'more code follows...more filters set on different pivottables as well as the End IF
what can i do:
-add data to source and see pivot table get updated with new data.set the values filters
-create new pivot table off same source within same file- but get the same limitation
- go back to a version of the file from 5 days ago and see the date filter option enabled and the date filter is set. what is different about the two files at this point I dont know.
--source data worksheet is unprotected and there are no locked cells involved on the listobject that is the source data.
--worksheet where pivottable resides is also unlocked, and there are no other sheets with pivot tables referencing the data.
both files (not working from today and working from 5 days ago) are .xls docs in compatibility mode.
maybe this is because I opened file via 2003? ...we have read-only users who would view the spreadsheet from 2003. I was using pivot tables to gather/compute the data (when run against win 2010 or 2007) and then displaying it for the 2003 crew by paste values. meanwhile the same file needs to be able to retain the functionality so that next time it can compute again. Recently have been doing the checking to see they were ok.
pt.PivotFields("Date Closed").PivotFilters.count = 0, so no filters exist on the field in question
seems like the problem is at a higher level because several of the pivotfilters appear to be having similar problem
officialdate is getting populated with a date- I can see that so its just a matter of applying the filter- which like I said- worked before...hmmm.
going manually to the report filters - Date filters appears to be grayed out....I want to check on what type of value the filed is supposed to be, but under field settings I dont see format number button.
any explanation/help would be appreciated- thank you