Skip to content

Count, average and show percentages in a PivotTable

PivotTables10 minPremium

Builds on Rearrange a PivotTable with Rows, Columns and Filters.

An auto parts distributor in Ohio reviews its product lines every January. The totals are ready, but the board asks for more: how many orders each line took, the average order, and each line's share of the year's sales.

How it works

A value field adds up by default, but the same field can count, average or compare. Click the field in the Values area and choose Value Field Settings, or right-click a number in the PivotTable. The dialog has two tabs.

  • Summarize Values By picks the calculation: Sum, Count, Average, Max, Min and a few statistics. Count counts the rows with an entry in the field, text included, as COUNTA does.
  • Show Values As keeps that calculation and shows each result against something else: % of Grand Total, % of Column Total, % of Row Total, the difference from another item, a running total or a rank.

The comparisons need a base. Difference From asks for a base field and a base item: Month and (previous) compare each month with the one before it, and the first month stays empty.

The Custom Name box at the top replaces Sum of Sales with words of your own. To show a total and its share side by side, drag the same field into Values twice and change only the second one.

Example

The distributor puts Product in Rows, Year in Columns and Sales in Values, then switches Show Values As to % of Column Total.

  1. Step 1: The 2026 column adds up to $90,000.
  2. Step 2: Tires' $54,000 divided by $90,000 shows as 60.0%.
  3. Step 3: Each column adds up to 100%, so you compare shares within a year.
% of Column Total divides each value by the total of its column, so each year adds up to 100%. Tires grew from half of the 2025 sales to 60% of 2026's.

Common mistakes

  • % of Grand Total where you meant % of Column Total. With years across the top, the shares then add up to 100% over both years, and each year's shares look small.
  • % of Row Total on a report with nothing in Columns. Every row shows 100%.
  • Count on a field with empty cells. Count skips them and comes out short, so count a field that's filled in on every row, such as an order number.
  • Count of Amount where you wanted a sum. A text entry such as TBC in the column makes Excel start the field on Count.

In short

  • Value Field Settings sets what a value field calculates and how it shows the result.
  • Count counts the rows with an entry in the field, so pick one that's never empty.
  • % of Column Total divides each value by its column's total, and Difference From compares each item with a base item, such as the month before.

Practice

Premium

5 exercises: 4 PivotTables and 1 quiz question.

Practice is part of Premium

Every lesson is free to read, and you can practice the free lessons without an account. This lesson's exercises are part of Premium, which you add to a free account.