Yes, Google Sheets pivot tables automatically ignore completely blank cells in the data range when calculating values, but they still show a “(blank)” row or column for any field that has at least one empty cell in the source data. To remove that visible “(blank)” item, you can filter it out directly in the pivot table editor or use a helper column to replace blanks with a placeholder before creating the pivot table.
How Pivot Tables Handle Blank Cells by Default
When you build a pivot table in Google Sheets, the engine aggregates data by unique values in the selected rows and columns. If a cell in a row or column field is empty, that empty cell becomes its own category, labeled “(blank)” in the pivot table. This is not an error—it is how the pivot table represents the absence of a value. For value fields (like Sum, Count, Average), blank cells are simply ignored in the calculation. For example, if you have a column of numbers with one empty cell, the Sum and Count will exclude that empty cell entirely.
However, if you place a field in the Rows or Columns area and that field contains blanks, the pivot table will include a “(blank)” entry. This can be annoying when you want a clean report without that placeholder. The good news is that you can hide it without altering your source data.
Removing the “(blank)” Row or Column
The quickest way to hide the “(blank)” item is to use the filter built into the pivot table editor. Here are the steps:
- Click anywhere on the pivot table to open the Pivot table editor on the right.
- Under Rows or Columns, find the field that shows “(blank)”. Click the drop-down arrow next to that field name.
- In the filter section, uncheck the box next to “(blank)”.
- Click OK. The “(blank)” row or column disappears from the pivot table.
This filter is saved with the pivot table, so it will remain hidden even if you refresh the data. If you add new blank cells later, they will be hidden as long as the filter is active.
Using a Helper Column to Replace Blanks
If you prefer not to rely on the pivot table filter—for example, if you want the blank cells to appear as a meaningful category like “Not Specified”—you can create a helper column in your source data. This is a common approach when you want to keep the original data intact but control how blanks are displayed.
Suppose your data has a column A with some empty cells. In a new column (say column C), enter a formula like:
=IF(A2="","Not Specified",A2)
Drag the formula down to cover all rows. Then, when you create or edit your pivot table, use column C instead of column A for the Rows or Columns field. The pivot table will now show “Not Specified” instead of “(blank)”. This method also works for value fields if you want to count blanks as a specific number, though typically you would just leave value fields as is.
Why Blank Cells Sometimes Still Appear in Values
A common misconception is that blank cells in a value field (like a column of numbers) will cause the pivot table to show a zero or a blank result. In reality, Google Sheets ignores blank cells in value calculations. For example, if you have a list of sales amounts and one cell is empty, the Sum will add only the non-empty cells. The Count will count only non-empty cells. The Average will divide by the number of non-empty cells, not by the total number of rows.
However, if you use a calculated field or a custom formula that references blank cells, you might get unexpected results. For instance, if you create a calculated field that multiplies two columns and one of them is blank, the result will be blank, and that blank will be ignored in the pivot table’s totals. To avoid this, you can use the IF function in a helper column to convert blanks to zero before using it in a calculated field.
Common Problems and Solutions
Here are a few issues users run into when dealing with blanks in pivot tables:
- Blank cells appear as “(blank)” in rows/columns: Use the filter in the pivot table editor to uncheck “(blank)”, or replace blanks with a placeholder using a helper column.
- Pivot table not updating when blanks are added: If you add new rows to your source data, make sure the pivot table’s data range includes those rows. You may need to update the range in the pivot table editor or convert your source data to a named range or table.
- Blanks in multiple columns: If you have blanks in several fields, you must filter each field individually. Alternatively, use a helper column that combines fields with IF and ISBLANK.
- Blanks in date fields: If you group dates and have blanks, the blank will show as a separate group. Filter it out the same way, or replace blanks with a date like 1/1/1900 if you want them grouped with a specific period.
Google Sheets vs. Excel: Key Differences
In Microsoft Excel, pivot tables also show “(blank)” for empty cells, but the filtering method is slightly different. In Excel, you right-click on the “(blank)” item and select “Filter” > “Hide Selected Items”. In Google Sheets, you use the field drop-down in the pivot table editor. Also, Excel has a built-in option in PivotTable Options to “For error values show” and “For empty cells show”, but that only affects display, not the underlying data. Google Sheets does not have a global option to replace blanks in the pivot table; you must use filters or helper columns.
Another difference: In Excel, if you refresh a pivot table, hidden items may reappear if new data has blanks. In Google Sheets, the filter you set is persistent, so it stays hidden until you change it. This makes Google Sheets slightly easier for ongoing reports.
Best Practices for Clean Pivot Tables
To avoid blank-related issues from the start, follow these practices:
- Clean your source data before creating a pivot table. Use Find and Replace to fill blanks with a placeholder like “N/A” if appropriate.
- Use data validation to prevent blanks from being entered in critical fields.
- If you frequently add data, consider using a named range or a dynamic range formula like
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),COUNTA(Sheet1!$1:$1))so the pivot table automatically includes new rows. - When using calculated fields, wrap references to blank-prone cells with IFERROR or IF to avoid propagating blanks.
Frequently Asked Questions
Why does my pivot table show “(blank)” even though I have no empty cells?
If you see “(blank)” but your source data appears complete, check for cells that contain only spaces or non-printing characters. These are not technically empty, but Google Sheets treats them as blank in some contexts. Use the TRIM function in a helper column to remove extra spaces, or use Find and Replace to remove spaces.
Can I permanently remove the “(blank)” label without filtering every time?
Yes, the filter you set in the pivot table editor is saved with the pivot table. Once you uncheck “(blank)”, it stays hidden until you manually re-enable it. However, if you create a new pivot table from the same data, you will need to apply the filter again.
Does ignoring blanks affect the average calculation?
No. The AVERAGE function in a pivot table ignores blank cells. It only divides by the number of non-empty cells. If you want to include blanks as zeros, you must replace them with 0 in the source data or use a calculated field.
How do I count blank cells in a pivot table?
By default, a pivot table does not count blanks in a value field. To count blanks, create a helper column with a formula like =IF(ISBLANK(A2),1,0) and then use that column as a value field with Sum. This will give you the count of blanks.
Will filtering out “(blank)” affect my totals?
Filtering out “(blank)” in a row or column field only hides that specific item. The grand totals will still include the values from the blank rows/columns unless you also exclude them from the totals. If you want totals to exclude blanks, you must filter the underlying data before creating the pivot table, or use a helper column that excludes blanks.
Can I use a script to automatically remove blanks from pivot tables?
Yes, you can use Google Apps Script to modify pivot table settings, but it is complex. A simpler approach is to use a query function to filter out blanks before creating a pivot table, or to use a helper column as described above. For most users, manual filtering is sufficient.
Related
- Generate Random Number in Blue Prism: Full Guide
- Shortcut for Arrow? Best Ways to Type →
- Data Entry Software for Small Surveys? Best Picks
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Trendline Equation Doesn’t Match Data?If an Excel trendline equation seems not to match your data, first check whether the chart label has…
- Add a Trendline to an Excel Bar Chart? Here’s How It WorksYes—Excel for Microsoft 365 on Windows can add a trendline to a supported 2-D bar chart. Select the…
- Excel Pivot Table Add to Data Model: A Practical GuideTo add data to the Excel Data Model, select a cell in your source range, choose Insert >…
- Excel Pivot Table Repeat Row Labels: How to Do It EasilyTo repeat row labels in an Excel PivotTable, select the PivotTable, choose PivotTable Design > Report Layout >…
- Excel Stacked Bar Chart: Add Total LabelsTo add totals to an Excel stacked bar chart, put each bar’s total in worksheet cells, add data…
- Excel Chart Series Name: Change It and Fix Series LabelsTo change an Excel chart series name in Microsoft 365 for Windows, select the chart, choose Chart Design…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.