Pivot Table Issues

Exclude Zeros from the Minimum in an Excel PivotTable

John WilsonJohn Wilson Nov 18, 2026 869 views

Question details

Calculate the minimum value in an Excel PivotTable without counting zero values.

How to Exclude Zeros from the Minimum in an Excel PivotTable
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to summarize numeric source data in a PivotTable and find the minimum nonzero value.
Observed behavior
The desired PivotTable minimum excludes zero values while retaining other numeric values.
Before you start

Identify the numeric source column used for the minimum and check that its values are stored as numbers. The following method requires an Excel version with Power Query.

Solution 1Recommended

Create a Zero-Free Value Column with Power Query

Use this method to keep the original values while creating a column for the PivotTable minimum that treats zeros as null.

1
Open the source in Power Query

Select a cell in the source data, then choose Data > From Table/Range. Confirm the table range and headers if prompted.

2
Add a custom column

In Power Query, select Add Column > Custom Column. Name it Nonzero Amount and enter `if [Amount] = 0 then null else [Amount]`, replacing Amount with your source column name.

3
Set the data type and load

Select the new column, choose an appropriate numeric type from Transform > Data Type, then select Home > Close & Load to load the query results into Excel.

4
Build the PivotTable

Select a cell in the loaded table and choose Insert > PivotTable. Add your grouping fields to Rows or Columns, then drag Nonzero Amount to Values.

5
Set the minimum calculation

Open the Nonzero Amount field's menu in the Values area, choose Value Field Settings, select Min, and click OK.

Create a Zero-Free Value Column with Power Query
Refresh after source changes: Use Data > Refresh All after updating the original table so the query and PivotTable use the latest data. Negative values remain eligible for the minimum.
Free Microsoft Office alternative

Work with Spreadsheet Data in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar spreadsheet interface. Open compatible Excel workbooks and continue working with your data as you move between applications.

Analyze spreadsheet data with WPS Spreadsheets and PivotTablesOpen and edit Microsoft Excel formats, including XLSX and XLSUse a familiar interface for everyday spreadsheet tasksMove existing compatible workbooks into a lightweight office suite
QA img-9

Frequently Asked Questions

Will negative numbers still be included in the minimum?

Yes. The custom column replaces only zeros with null, so negative numbers remain eligible and may be the minimum.

What happens if a group contains only zeros?

The custom column contains no numeric values for that group, so it has no nonzero minimum. Check the source data rather than interpreting a displayed zero as a valid minimum.

Does hiding zeros in Excel exclude them from the calculation?

No. Display settings or number formats can hide zeros without removing them from the PivotTable calculation. Convert them to null in the query or otherwise exclude them from the data being summarized.

How do I update the minimum when source values change?

After editing the original source table, select Data > Refresh All to refresh the Power Query output and the PivotTable.