When a filter is applied to a Pivot Table, you may see rows or columns disappear. This is because pivot tables, by default, display only items that contain data. In the example shown, a filter has been applied to exclude the East region. Normally the Blue column would disappear, because there are no entries for Blue in the North or West regions. However, Blue remains visible because field settings for color have been set to "show items with no data", as explained below.
Fields
The pivot table shown is based on three fields: Region, Color, and Sales:
Region has been configured as a Row field, Color as a Column field, and Sales is a Value field.
Data has been filtered by Region to exclude East:
To force the display of items with no data, "Show items with no data" has been enabled on the Layout & Print tab of the Color field settings, as seen below:
To force the pivot table to display zero when items have no data, a zero is entered in general pivot table options:
Finally, the Accounting number format has been applied to the Sales field to display empty cells with a dash (-).
Note: the same problem can occur with dates are grouped as months, and no data appears in a given month. You can use the same approach, with a few extra steps, described here.
Steps
- Create a pivot table
- Add Region field to Rows area
- Add Color field to Columns area
- Enable "show items with no data"
- Add Sales field to Values area
- Apply Accounting number format
- Set pivot table options to use zero for empty cells