Pivot Table Issues

How to Fix Incorrect Excel PivotTable Totals for Time ([h]:mm) Values

Khadija KhanKhadija Khan Nov 4, 2026 869 views

Question details

The user needs to resolve an issue where Excel PivotTable subtotals and totals for time values do not match the expected sum shown in the status bar.

How to Fix Incorrect Excel PivotTable Totals for Time ([h]:mm) Values
Product
Microsoft Excel
Device & OS
not provided
Scenario
Aggregating allocated minutes converted via the TIME function inside a PivotTable using a custom duration format.
Observed behavior
The PivotTable subtotals and grand totals display incorrect amounts compared to the actual sum of the source data, despite the values being displayed using the [h]:mm format.
Before you start

Ensure your source data contains actual Excel numerical time values (representing fractions of a day) rather than text strings that merely look like times.

Solution 1Recommended

Apply [h]:mm Format via Value Field Settings

The most common reason for incorrect PivotTable time totals is applying the cell format to the worksheet display rather than the underlying PivotTable value field.

Formatting the raw source data cells or manually changing the cell format in the PivotTable grid often fails to apply the format to the PivotTable's internal aggregation logic. To ensure totals and subtotals display correctly for durations exceeding 24 hours, the format must be applied directly to the Value Field Settings.

1
Select a value in the PivotTable

Click on any cell within the values area of your PivotTable that contains the time data.

2
Open Value Field Settings

Right-click the selected cell and choose 'Value Field Settings' from the context menu.

3
Set aggregation to Sum

In the 'Summarize Values By' tab, ensure the calculation type is set to 'Sum' rather than 'Count'.

4
Modify Number Format

Click the 'Number Format' button located at the bottom left of the dialog box.

5
Apply custom duration format

Select 'Custom' from the Category list, type '[h]:mm' in the Type field, and click 'OK' on both dialog boxes to apply the changes.

Apply [h]:mm Format via Value Field Settings
Tip: Using square brackets [h] tells Excel to display elapsed hours (durations over 24 hours) instead of resetting the clock at midnight.
Easily Calculate Time Durations in WPS Spreadsheet

Create and Format Pivot Tables Effortlessly with WPS Office

WPS Spreadsheet provides robust PivotTable functionality with full support for custom time formats like [h]:mm. You can easily aggregate, summarize, and format complex duration data with an intuitive interface.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the time data.
  2. 2. Insert a PivotTable: Go to the 'Insert' tab and click 'PivotTable' to create your data summary.
  3. 3. Configure Value Field Settings: Drag your time field into the 'Values' area, right-click any value cell, and select 'Value Field Settings'.
  4. 4. Apply [h]:mm Format: Ensure the field is set to 'Sum', click 'Number Format', and apply the custom format '[h]:mm'.
Fully compatible with Microsoft Excel (.xlsx) file formats and PivotTable structures.Intuitive Value Field Settings for quick and accurate custom number formatting.Advanced calculation engine ensures correct aggregation of time values and durations.Free, lightweight, and fast alternative for all your spreadsheet data analysis needs.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel time sum reset after 24 hours?

Standard time formats like 'hh:mm' represent a specific time of day on a clock, which resets every 24 hours. To display total elapsed time or durations over 24 hours, you must use square brackets around the hour in the custom formatting, like '[h]:mm'.

Can I format the source data cells instead of using Value Field Settings?

While formatting the source data helps you read the raw numbers, PivotTables often rely on their own internal formatting rules when generated. It is highly recommended to apply formats directly through the PivotTable's Value Field Settings to ensure subtotals and grand totals display the correct format natively.

What happens if my time values are stored as text?

PivotTables cannot mathematically sum text strings. If your times are stored as text, the PivotTable will default to the 'Count' aggregation instead of 'Sum'. You must convert the text to numerical time values in the source data using functions like TIMEVALUE before refreshing the PivotTable.