Pivot Table Issues

How to Format Subtotals and Sort Data in Pivot Tables

Phi Hung VoPhi Hung Vo Oct 28, 2026 869 views

Question details

The user wants to apply distinct subtotal formatting across multiple hierarchy levels, control selective subtotal visibility, sort items by specific values like market value, and modify layout lines beneath grouped data.

How to Format Subtotals and Sort Data in Pivot Tables
Product
Spreadsheet
Device & OS
not provided
Scenario
Customizing a complex Pivot Table report to meet specific visual and sorting requirements for different data hierarchy levels.
Observed behavior
Standard Pivot Table options apply uniform formatting to subtotals and have limitations on selective visibility per hierarchy level directly from the default style menus.
Before you start

Before applying advanced formatting, ensure your source data is clean, formatted as a standard Table, and backed up in a sample workbook with non-sensitive data for testing custom layouts.

Solution 1Recommended

Customize Pivot Table Subtotal Visibility and Layout

Change how and where subtotals appear, or remove them for specific fields to declutter your report.

Standard PivotTable styles allow you to globally show or hide subtotals. However, you can also toggle them for individual fields to achieve selective visibility.

1
Access PivotTable Tools

Select any cell inside your Pivot Table to reveal the PivotTable Tools on the top ribbon.

2
Modify Global Subtotal Settings

Go to the 'Design' tab, click on 'Subtotals', and choose 'Do Not Show Subtotals', 'Show all Subtotals at Bottom of Group', or 'Show all Subtotals at Top of Group'.

3
Toggle Selective Subtotals

To hide subtotals for a specific field only, right-click the field header within the Pivot Table and uncheck 'Subtotal [Field Name]' from the context menu.

4
Add Blank Lines Between Groups

To add a separating line beneath each fund or group, stay on the 'Design' tab, click 'Blank Rows', and select 'Insert Blank Line after Each Item'.

Customize Pivot Table Subtotal Visibility and Layout
Formatting Limitations: Standard Pivot Tables apply the same style to all subtotals. For completely different formatting per hierarchy level, conditional formatting is required.
Efficient Data Analysis

Create and Format Pivot Tables with WPS Spreadsheet

WPS Spreadsheet provides robust Pivot Table features, allowing you to easily summarize, sort, and format large datasets. It is fully compatible with Microsoft Excel file formats, ensuring your complex reports render perfectly.

  1. 1. Open Your Data: Launch WPS Spreadsheet and open your dataset.
  2. 2. Insert a Pivot Table: Go to the 'Insert' tab and click 'PivotTable'.
  3. 3. Build Your Report: Select your data range, choose a destination, and drag fields into the Rows, Columns, and Values areas.
  4. 4. Customize Layout: Use the 'Design' tab to adjust subtotal visibility, insert blank rows, and apply custom sorting to your hierarchy levels.
Fully compatible with Microsoft Excel (.xlsx) Pivot TablesIntuitive drag-and-drop Pivot Table builderAdvanced sorting and filtering options by valueFree and lightweight spreadsheet tool
microsoft office alternative - wps office

Frequently Asked Questions

Can I format subtotals for different hierarchy levels differently?

By default, Pivot Table styles apply uniform formatting to all subtotal levels. To achieve distinct formatting per level, you must manually apply styles or use custom Conditional Formatting rules based on the row text.

How do I hide the subtotal for just one specific column?

Right-click the header of the specific field in your Pivot Table and click on 'Subtotal [Field Name]' to toggle its visibility off without affecting the subtotals of other fields.

Why won't my Pivot Table sort by market value?

Ensure you are applying the sort to the correct row label. Click the filter arrow on the row field you want to sort, choose 'More Sort Options', and explicitly select the 'Sum of Market Value' field as the sorting criteria.

How can I add a blank line below each group in a Pivot Table?

Under the PivotTable Tools 'Design' tab, click on 'Blank Rows' and select 'Insert Blank Line after Each Item' to create visual separation between your fund or security groups.