Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST TOOLS

Excel Tutorial

Excel HOME Excel Introduction Excel Get Started Excel Overview Excel Syntax Excel Ranges Excel Fill Excel Move Cells Excel Add Cells Excel Delete Cells Excel Undo Redo Excel Formulas Excel Relative Reference Excel Absolute Reference Excel Arithmetic Operators Excel Parentheses Excel Functions

Excel Formatting

Excel Formatting Excel Format Painter Excel Format Colors Excel Format Fonts Excel Format Borders Excel Format Numbers Excel Format Grids Excel Format Settings

Excel Data Analysis

Excel Sort Excel Filter Excel Tables Excel Conditional Format Excel Highlight Cell Rules Excel Top Bottom Rules Excel Data Bars Excel Color Scales Excel Icon Sets Excel Manage Rules (CF) Excel Charts

Excel PivotTables

Excel PivotTable Intro Excel Create PivotTable Excel PivotTable Values Excel PivotTable Filter Excel PivotTable Group Excel Calculated Field Excel PivotChart

Excel Case

Case: Poke Mart Case: Poke Mart, Styling

Excel Functions

AND AVERAGE AVERAGEIF AVERAGEIFS CONCAT COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS DATEDIF FILTER HLOOKUP IF IFERROR IFS INDEX INDEX MATCH LEFT LEN LOWER MATCH MAX MEDIAN MID MIN MODE NETWORKDAYS NPV OR PROPER RAND RIGHT ROUND SORT STDEV.P STDEV.S SUBSTITUTE SUM SUMIF SUMIFS SUMPRODUCT TEXTJOIN TODAY TRIM UNIQUE UPPER VLOOKUP XLOOKUP XOR

Excel How To

Convert Time to Seconds Difference Between Times NPV (Net Present Value) Remove Duplicates

Excel Cert

Excel Certificate

Excel Examples

Excel Exercises Excel Syllabus Excel Study Plan Excel Training

Excel References

Excel Keyboard Shortcuts


Excel PivotTable Values


Share

PivotTable Values

The Values area decides which numbers a PivotTable shows, and how Excel calculates them.

Excel sums number fields and counts text fields by default. You can change that for each field.

This chapter uses Poke Mart sales data. Download it to follow along: poke_mart_sales.xlsx

Start with the PivotTable from the previous chapter: Category in Rows and Sum of Sales in Values.

AB
3Row LabelsSum of Sales
4Balls4447200
5Medicine4413600
6Status Healers556000
7Grand Total9416800

Value Field Settings

All the options for a value are in the Value Field Settings dialog. To open it:

  1. Click the arrow next to Sum of Sales in the Values area of the PivotTable Fields pane
  2. Choose Value Field Settings

You can also right-click any number in the PivotTable and choose Value Field Settings.

The dialog has four parts:

  • Custom Name: the header text of the value
  • Summarize Values By: how the value is calculated
  • Show Values As: how the result is shown, for example as a percentage
  • Number Format: how the numbers look


Summarize Values By

This tab picks the calculation. These are the ones you will use most:

FunctionWhat it does
SumAdds up the values. The default for number fields
CountCounts the rows that have a value. The default for text fields
AverageThe sum divided by the count
MaxThe largest value
MinThe smallest value

Count: Orders per Category

How many orders does each category have? Each order has one OrderID, so count the OrderID field.

  1. Drag OrderID to the Values area
  2. Excel shows Sum of OrderID, because OrderID is a number. Adding up order numbers makes no sense, so change it
  3. Open Value Field Settings for Sum of OrderID
  4. Choose Count and click OK

The Value Field Settings dialog for OrderID on the Summarize Values By tab, with Count selected and the Custom Name Count of OrderID

ABC
3Row LabelsSum of SalesCount of OrderID
4Balls44472001035
5Medicine44136001110
6Status Healers556000595
7Grand Total94168002740

The header changes to Count of OrderID.

The Grand Total, 2,740, is the number of rows in the data.

Note: Count counts rows, not unique values.

For example, Count of Store shows 1035 for Balls, even though there are only 6 stores. Each of the 1,035 ball orders has a store, so each one is counted.

To count unique values, check Add this data to the Data Model when you create the PivotTable. Value Field Settings then offers Distinct Count.

Average: Sales per Order

What is the average sale per order in each category?

  1. Open Value Field Settings for Sum of Sales
  2. Choose Average and click OK
ABC
3Row LabelsAverage of SalesCount of OrderID
4Balls4296.8115941035
5Medicine3976.2162161110
6Status Healers934.4537815595
7Grand Total3436.7883212740

The header changes to Average of Sales.

The average is the sum divided by the count. For Balls: 4,447,200 / 1,035 = 4,296.81.

The Grand Total is the average of all 2,740 orders. It is not the average of the three category averages.

Excel shows many decimals here. You will learn to fix that with Number Format below.

Max and Min

Max shows the largest single value in each group. Min shows the smallest.

For example, Max of Sales shows 9600 for Balls: the biggest ball order. Min of Sales shows 1000.

Before you go on, set the Sales value back to Sum, and uncheck OrderID in the field list to remove Count of OrderID.


Show Values As

Show Values As keeps the calculation, but shows the result in a new way, for example as a percentage.

% of Grand Total

What share of all sales does each category have?

  1. Open Value Field Settings for Sum of Sales
  2. Click the Show Values As tab
  3. Choose % of Grand Total in the list
  4. Click OK

The Value Field Settings dialog on the Show Values As tab, with % of Grand Total selected

AB
3Row LabelsSum of Sales
4Balls47.23%
5Medicine46.87%
6Status Healers5.90%
7Grand Total100.00%

Balls and Medicine each bring in almost half of all sales. Status Healers bring in less than 6%.

The header still says Sum of Sales. The value is still a sum. It is only shown as a share of the total.

Other useful choices in the list are % of Column Total, % of Row Total and Running Total In.

To see the amounts and the percentages side by side, drag Sales to the Values area a second time, and change only the copy.

Before you go on, set Show Values As back to No Calculation.


Number Format

By default, Excel shows the sums without a thousands separator:

AB
3Row LabelsSum of Sales
4Balls4447200
5Medicine4413600
6Status Healers556000
7Grand Total9416800

To add a thousands separator:

  1. Open Value Field Settings for Sum of Sales
  2. Click Number Format
  3. Choose Number
  4. Set Decimal places to 0
  5. Check Use 1000 Separator (,)
  6. Click OK twice
AB
3Row LabelsSum of Sales
4Balls4,447,200
5Medicine4,413,600
6Status Healers556,000
7Grand Total9,416,800

Much easier to read!

The format belongs to the value field, so it stays when you rearrange or refresh the PivotTable.

If you format the cells from the Home tab instead, the format can get lost when the PivotTable changes.

Read more about number formats in Excel Format Numbers.


Rename a Value Field

You can give a value a shorter or clearer name, like Total Sales.

  1. Open Value Field Settings for Sum of Sales
  2. Type Total Sales in the Custom Name box
  3. Click OK

You can also click the header cell, B3, type the new name, and press Enter.

AB
3Row LabelsTotal Sales
4Balls4,447,200
5Medicine4,413,600
6Status Healers556,000
7Grand Total9,416,800

Note: A value cannot have the same name as a field in the data. If you type Sales, Excel says that the field name already exists. Pick another name, or add a space at the end of it.


Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.