expfresocspy
01-09-2012, 08:42 PM
So I want to show only the current month and the 5 months before . Meaning , If the current month is February , my pivot table should show values from September , October , November , December , January nd February .
Here is my code :
ColumnFields:=Array("Month Submitted"), _
For Each PivItem In _
PT.PivotFields("Month Submitted").PivotItems
PivItem.Visible = True
Next PivItem
For Each PivItem In _
PT.PivotFields("Month Submitted").PivotItems
Select Case PivItem.Name
Case Current Date to the last 5 months
PivItem.Visible = True
Case Else
PivItem.Visible = False
End Select
Next PivItem
Thank you so very much for the help ! :D
Here is my code :
ColumnFields:=Array("Month Submitted"), _
For Each PivItem In _
PT.PivotFields("Month Submitted").PivotItems
PivItem.Visible = True
Next PivItem
For Each PivItem In _
PT.PivotFields("Month Submitted").PivotItems
Select Case PivItem.Name
Case Current Date to the last 5 months
PivItem.Visible = True
Case Else
PivItem.Visible = False
End Select
Next PivItem
Thank you so very much for the help ! :D