Chart & Visualization Issues

How to Create an Excel Chart That Excludes Empty Rows

Chanuka GeekiyanageChanuka Geekiyanage Oct 26, 2026 868 views

Question details

The user needs to create an Excel chart that automatically ignores or excludes blank and N/A rows present in the source dataset.

How to Create an Excel Chart That Excludes Empty Rows
Product
Spreadsheet / Excel
Device & OS
not provided
Scenario
Creating a visualization, such as a top-five chart, from a data range that contains empty or N/A rows due to ties or unfiltered pivot tables.
Observed behavior
The chart reserves space for the empty rows because they are included in the source range, resulting in extra blank categories or gaps in the final visualization.
Before you start

Ensure your source data has clear column headers, and identify which specific columns contain the empty or N/A values you want to exclude from your chart.

Solution 1Recommended

Filter Data and Create a PivotChart

The most effective way to exclude empty rows without using complicated formulas is to summarize your data with a PivotTable, filter out the blanks, and insert a PivotChart.

By default, standard charts display exactly what is in the source range. By routing your data through a PivotTable first, you can dynamically filter out invalid data, ensuring your final chart remains clean even if the source data updates.

1
Insert a PivotTable

Select your entire source data range. Go to the 'Insert' tab on the ribbon and click 'PivotTable'. Choose to place it on a New Worksheet or Existing Worksheet.

2
Configure PivotTable Fields

In the PivotTable Fields pane, drag the category you want to graph into the 'Rows' (or Axis) area, and your numeric data into the 'Values' area.

3
Filter out Blanks and N/A

Click the drop-down filter arrow next to 'Row Labels' in the PivotTable. Uncheck the boxes for '(blank)' or '#N/A', then click 'OK'.

4
Insert the PivotChart

Click anywhere inside the filtered PivotTable. Go to the 'Insert' tab and select 'PivotChart'. Choose your desired chart type. The chart will now only display the qualifying categories.

Filter Data and Create a PivotChart
Dynamic Updates: When your source data changes, simply right-click the PivotTable and select 'Refresh'. Your PivotChart will automatically update while keeping empty rows excluded.
Smart Charting with WPS Office

Exclude Empty Rows Instantly with WPS Spreadsheet

WPS Office Spreadsheet offers highly intuitive PivotTable and charting tools that make visualizing data effortless. You can easily filter out N/A or blank rows and generate clean, professional charts in seconds.

  1. 1. Open your data: Launch WPS Spreadsheet and open the document containing your raw dataset.
  2. 2. Create a PivotTable: Select the dataset, go to the 'Insert' tab, and click 'PivotTable'.
  3. 3. Filter the data: Set up your rows and values, then use the drop-down filter on the row labels to exclude any blank or '#N/A' items.
  4. 4. Insert Chart: With the PivotTable selected, navigate back to 'Insert', click 'Chart', and choose your preferred visualization type. The chart will dynamically exclude the hidden rows.
Easily filter blank and N/A rows using built-in PivotChartsFully compatible with Microsoft Excel (.xlsx) formatsIntuitive and user-friendly interface for data visualizationFree and lightweight software alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel chart show gaps for empty cells?

By default, standard Excel charts plot all cells included in the specified source range. If there are empty cells or N/A values within that range, the chart reserves space on the axis for them, resulting in visible gaps or empty categories.

Can I use formulas instead of a PivotTable to skip blanks in charts?

Yes, you can use dynamic array formulas like FILTER to extract non-blank rows into a new, contiguous range, and then build your chart from that new range. However, for most users, creating a PivotChart is a much simpler and quicker workaround.

Does deleting the empty rows fix the chart?

Yes. If you permanently delete the empty rows from the source data, the chart will immediately remove those categories. However, if your source data is automatically generated or linked to another system, filtering via PivotTables is a better, non-destructive solution.