How to Display Zero When a PivotTable Has No Matching Items
Question details
The user wants to display a zero (0) instead of a blank when a PivotTable filter yields no matching items or when encountering an empty result.

- Product
- Spreadsheet Software
- Device & OS
- not provided
- Scenario
- Filtering data in a PivotTable where certain combinations of filters yield no data, leaving cells blank instead of displaying a numerical zero.
- Observed behavior
- The PivotTable displays blank cells or prevents the selection of empty categories because the filter requires at least one item to remain selected.
Ensure your PivotTable is fully refreshed with the latest source data. Identify whether you want to display zeros inside the PivotTable itself or in a separate reporting cell linked to the PivotTable.
Use an IF and GETPIVOTDATA Formula Outside the PivotTable
Extract the PivotTable data into a separate cell and use an IF statement to convert blank results into a zero.
Because a PivotTable filter requires at least one selection, it cannot directly represent an empty category in the filter dropdown. To work around this, you can pull the data into a linked report cell.
By wrapping the GETPIVOTDATA function inside an IF formula, you can explicitly tell the spreadsheet to output a '0' whenever the PivotTable returns an empty string.
Click on an empty cell outside of your PivotTable area where you want the final result to appear.
Type the formula =IF(GETPIVOTDATA("Amount",$A$3)="", 0, GETPIVOTDATA("Amount",$A$3)). Replace "Amount" with your actual data field name and $A$3 with your PivotTable's starting reference cell.
Press Enter to apply the formula. The cell will now display 0 if the PivotTable result is blank, and the actual value if there is matching data.

Change PivotTable Options to Show Zero in Empty Cells
Modify the built-in PivotTable layout settings to automatically display a '0' for any empty cell within the value area.
Apply Custom Number Formatting
Use custom cell formatting to visually change how blank or missing values are presented without altering the underlying data.
Manage PivotTables Seamlessly with WPS Spreadsheet
WPS Spreadsheet provides powerful PivotTable functionalities, allowing you to quickly format empty cells, handle missing data, and perform advanced data analysis with zero hassle.
- 1. Open your file: Launch WPS Spreadsheet and open the workbook containing your PivotTable.
- 2. Access PivotTable Options: Right-click the PivotTable and select 'PivotTable Options' from the menu.
- 3. Modify the empty cell display: Under the 'Layout & Format' tab, locate 'For empty cells show:', enter '0', and click 'OK' to apply the changes instantly.

Frequently Asked Questions
Why doesn't the PivotTable filter allow me to select an empty category?
PivotTable filters require at least one item to remain selected to function correctly. If a data category is entirely empty or has been removed from the source data, it cannot be actively filtered as an 'empty' selection within the dropdown.
Can I force the PivotTable to show rows that have no data?
Yes. Right-click the field inside the PivotTable, choose 'Field Settings', navigate to the 'Layout & Print' tab, and check the box that says 'Show items with no data'. This will force the categories to appear even if their values are blank or zero.
Does the GETPIVOTDATA formula update automatically when the PivotTable changes?
Yes, GETPIVOTDATA is fully dynamic. As long as the referenced field structure remains intact, the formula will automatically recalculate and update the displayed values or zeros when you refresh the data or adjust the filters.




