Pivot Table Issues

Filter Excel Data and Add Category Subtotals with a PivotTable

Camila MilosovichCamila Milosovich Dec 2, 2026 869 views

Question details

Create a filtered report that calculates subtotals for each category.

Filter Excel Data and Add Category Subtotals with a PivotTable
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to group records by category, filter the report, and total numeric fields for each group.
Observed behavior
The desired report shows category totals that can be updated as the source data changes.
Before you start

Make sure the source data has a header row, a Category column, and numeric columns to total. Remove blank header cells and check that values to be summed are stored as numbers.

Solution 1Recommended

Create a PivotTable with category subtotals and filters

Use a PivotTable for a maintainable report that groups and filters data by category.

1
Convert the source to a table

Select a cell in the source range, choose Insert > Table, confirm the range and headers, and select OK.

2
Insert a PivotTable

Select a cell in the table, choose Insert > PivotTable, select where to place the report, and click OK.

3
Arrange the fields

In the PivotTable Fields pane, drag Category to Rows and each numeric field, such as Quantity or Boxes, to Values. To show detail groups beneath each category, drag an additional detail field below Category in Rows.

4
Set totals and filters

For each numeric Values field, open Value Field Settings and select Sum. Drag a field to Filters or use a Row Labels dropdown to filter the report. If you added a detail row field, select the PivotTable and choose Design > Subtotals > Show all Subtotals at Bottom of Group.

5
Refresh after changes

After adding or changing source data, right-click the PivotTable and select Refresh to update the report.

Category totals versus detail rows: With Category as the only row field, each category row already shows its aggregate total. Add a detail field beneath Category if you want separate detail groups and category subtotal rows.
Create a category report

Build category subtotals in WPS Spreadsheets

Use a PivotTable in WPS Spreadsheets to group numeric data by category, filter the report, and refresh its totals when the source data changes.

  1. 1. Open your spreadsheet: Open WPS Spreadsheets and use File > Open to select the workbook containing your source data.
  2. 2. Insert a PivotTable: Select the source range, then choose Insert > PivotTable and confirm the range and report location.
  3. 3. Group and total the data: In the PivotTable field list, drag Category to Rows and numeric fields to Values. Set the value calculation to Sum if needed.
  4. 4. Filter and refresh: Drag a field to Filters or use a row filter dropdown. After changing the source data, right-click the PivotTable and select Refresh.
Group categories and calculate subtotals in a PivotTableFilter the report by selected fieldsOpen and edit Microsoft Excel XLSX and XLS filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I filter the PivotTable by category?

Open the Row Labels dropdown and select the categories to display. You can also drag Category to the Filters area if you prefer a report-level filter.

Why does my PivotTable count values instead of summing them?

The source column may contain text or nonnumeric values. Correct the source data, refresh the PivotTable, and use Value Field Settings to select Sum.

Will new source rows appear in the report automatically?

An Excel Table can expand to include new rows, but the PivotTable generally needs a refresh. Right-click it and select Refresh after adding data.

How can I show a separate subtotal below each category?

Add a detail field below Category in the Rows area, then select the PivotTable and choose Design > Subtotals > Show all Subtotals at Bottom of Group.