PDA

View Full Version : hide 0 values in pivot table



expfresocspy
01-09-2012, 08:09 PM
Hello :D

The "World" field is in one column and the "Total" field is in another column. I want to make my pivot table to not show data from "World" that has the value "0" in the "Total" field. This is my code :

For Each PivItem In _
PT.PivotFields("World").PivotItems
PivItem.Visible = True
Next PivItem

' Now - loop through and keep only certain items visible
For Each PivItem In _
PT.PivotFields("World").PivotItems
Select Case PivItem.Name
Case "-", "(blank)"
PivItem.Visible = False
Case PivItem.Value = 0
PivItem.Visible = False
Case Else
PivItem.Visible = True
End Select
Next PivItem
Pretty please help me kind souls : pray2:

xld
01-10-2012, 03:57 AM
Wouldn't you just hide the row item for the zeroes? What is the row label?