Pivot Table Issues

Calculate a Percentage from Multiple Counts in an Excel PivotTable

Steven ParkerSteven Parker Dec 2, 2026 869 views

Question details

Calculate a PivotTable percentage by dividing a serviced count by a serial count when the PivotTable uses the Data Model.

Calculate a Percentage from Multiple Counts in an Excel PivotTable
Product
Microsoft Excel PivotTable and Power Pivot
Device & OS
not provided
Scenario
The user needs a percentage from multiple counts, potentially including distinct serial numbers.
Observed behavior
The Calculated Field option is disabled for the Data Model PivotTable.
Before you start

Check that the source table is in the Data Model and confirm its table and column names. Decide whether the percentage should count nonblank entries or distinct serial numbers, since repeated serials change the result.

Solution 1Recommended

Create a DAX measure for nonblank counts

Use this method to divide the number of nonblank service dates by the number of nonblank serial entries.

Data Model PivotTables use DAX measures instead of traditional calculated fields. COUNTA counts nonblank entries, including text serial numbers; it does not remove duplicates.

1
Open the measure dialog

Click the PivotTable, then select Power Pivot > Measures > New Measure. If the Power Pivot tab is missing, check whether your Excel edition supports it and whether the add-in is enabled.

2
Enter the measure

Select the source table, enter % Completed as the measure name, and enter =DIVIDE(COUNTA(Table1[Date Serviced]),COUNTA(Table1[Serial #]),0) as the formula. Replace Table1 and the column names with those in your Data Model.

3
Format and add the result

Set the measure format to Percentage in the dialog and click OK. In PivotTable Fields, drag % Completed to the Values area.

Create a DAX measure for nonblank counts
Check the counting basis: DIVIDE returns 0 when the denominator is zero. Because the two columns are counted independently, missing serials or repeated rows can affect the percentage.
Free Microsoft Office alternative

Explore PivotTables with WPS Spreadsheet

WPS Office is a free, lightweight Office alternative with a familiar interface and support for Excel files, making it easy to move everyday spreadsheet work to WPS Spreadsheet. Excel Data Model measures remain an Excel-specific solution.

Create and explore PivotTables for spreadsheet summariesOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why is Calculated Field grayed out in my PivotTable?

A PivotTable based on the Excel Data Model uses DAX measures rather than traditional calculated fields. Select Power Pivot > Measures > New Measure to create the calculation.

How do I count each serial number only once?

Use DISTINCTCOUNT on the serial-number column in a DAX measure. To exclude blank serials, wrap it in CALCULATE with a nonblank serial filter.

Will the percentage respond to PivotTable filters?

Yes. The measure is evaluated in the current filter context, so PivotTable rows, columns, slicers, and filters can change the counts used in the result.

What happens when there are no serial numbers to count?

The examples use DIVIDE with 0 as its alternate result, so the measure returns 0 when the denominator is zero.

Why is my percentage over 100%?

With independently counted columns, extra nonblank service dates or missing serial entries can make the numerator larger than the denominator. Check the source rows or use the distinct serviced-serial measure if that matches your goal.