Hello Everyone,
I have a pivot table that is updated every week and extended by the previous weeks data. The pivot table contains campaigns by country. I want to filter the campaigns for each country separately (and then copy it to another sheet). More precisely i need the data for the last week (therefore count-1).
But my filter parts creates some trouble. Thatīs what I tried:
Sheets("Campaign Details").Select
With ActiveSheet.PivotTables("PivotTable_Style-RM")
.ClearAllFilters 'make sure that no filters are set
For i = 1 To .PivotFields("calendar week").PivotItems.Count - 1
.PivotItems(i).Visible = False ' set all but the last PivotItem (last week) to invisible
Next
End With
calendar week is set as pivot table filter (above the table)
can anyone help me on this issue? would be very appreciated
Bookmarks