Pivot Table Issues

How to Refresh a Pivot Table Using Only Visible Filtered Rows

Rana GarciaRana Garcia Nov 11, 2026 869 views

Question details

The user wants to configure a Pivot Table so that it only includes data from rows that remain visible after applying filters to the source data table.

How to Refresh a Pivot Table Using Only Visible Filtered Rows
Product
Spreadsheets
Device & OS
not provided
Scenario
Filtering a source data table and needing the dependent Pivot Table to dynamically update and reflect only the visible filtered data.
Observed behavior
By default, Pivot Tables include all rows from the source data range, including those hidden by table filters. The goal is to exclude the filtered-out rows from the Pivot Table's calculations.
Before you start

Ensure your source data is formatted as an official Table and identify a column that contains data in every single row to use as your reference for the SUBTOTAL formula.

Solution 1Recommended

Use a SUBTOTAL Helper Column to Filter Visible Rows

Create a dynamic helper column in your source data that identifies visible rows, which can then be used as a filter field in your Pivot Table.

The SUBTOTAL function is unique because it automatically ignores rows that are hidden by a filter. By using it in a helper column, we can force the column to display a '1' for visible rows and a '0' for filtered rows.

1
Create a helper column

Add a new column to the right of your source data table and name it 'Visible'.

2
Enter the SUBTOTAL formula

In the first cell of the 'Visible' column, enter the formula =SUBTOTAL(3,[@YourColumnName]), replacing 'YourColumnName' with the name of a column that never contains blank cells. Press Enter to apply the formula.

3
Add the field to the Pivot Table

Click inside your existing Pivot Table, go to the PivotTable Analyze tab, and click 'Refresh' so the new 'Visible' column appears in the PivotTable Fields pane.

4
Filter by the helper column

Drag the 'Visible' field into the 'Filters' area of the Pivot Table. Click the filter dropdown above your Pivot Table and select '1'.

Use a SUBTOTAL Helper Column to Filter Visible Rows
Manual Refresh Required: Pivot Tables do not update automatically in real-time. Whenever you change the filters on your source data table, you must right-click the Pivot Table and select 'Refresh' to see the updated visible rows.
Advanced Data Analysis

Easily Manage Pivot Tables with WPS Spreadsheet

WPS Spreadsheet provides powerful data analysis tools, including advanced Pivot Tables and full support for dynamic formulas like SUBTOTAL. It perfectly handles complex data filtering needs while remaining intuitive and fast.

  1. 1. Open your data: Launch WPS Spreadsheet and open your dataset.
  2. 2. Insert the helper column: Add a 'Visible' column and type =SUBTOTAL(3, A2) (referencing a non-empty cell in the row).
  3. 3. Create the Pivot Table: Select your data, go to the 'Insert' tab, and click 'PivotTable'.
  4. 4. Filter the visible rows: Drag the 'Visible' field to the Filters area in the right pane and select '1' to show only visible data.
Fully compatible with Microsoft Excel (.xlsx, .xls) file formats.Advanced Pivot Table features for quick data summarization and filtering.Extensive formula library including SUBTOTAL for dynamic row visibility.Free, lightweight, and features a familiar tabbed user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't my Pivot Table update automatically when I filter the source data?

Pivot Tables are designed to hold a cache of your data to improve performance and prevent lag on large datasets. Because of this cache, you must manually refresh the Pivot Table (right-click inside it and select Refresh, or go to Data > Refresh All) after filtering or modifying the source data.

What does the '3' stand for in the =SUBTOTAL(3, ...) formula?

The '3' specifies the COUNTA function within the SUBTOTAL formula. It counts non-empty cells. The key benefit of using SUBTOTAL instead of standard COUNTA is that SUBTOTAL automatically ignores rows that are hidden by a filter, allowing it to return 1 for visible rows and 0 for hidden rows.

Can I automate the Pivot Table refresh process?

Yes. If you are comfortable using VBA, you can create a simple macro triggered by a worksheet event (such as Worksheet_Calculate or Worksheet_Activate) that automatically refreshes the Pivot Table cache whenever the source data is filtered or modified.