Sub topic 7
Adding value fields
This chapter assumes you can insert a PivotTable and drag fields in the PivotTable Fields pane. It also assumes you have a flat source range, such as the sales data below, with one header row and one record per row.
Date,Region,Product,Units,Sales
2025-01-05,East,Widget,10,250
2025-01-12,West,Gadget,4,180
2025-02-03,East,Gadget,7,315
2025-02-14,West,Widget,12,300
2025-03-09,East,Widget,5,125What a value field is
A value field is a source column that the PivotTable calculates over. Row and column fields supply the labels. Value fields supply the numbers in the body of the grid. Each cell in the grid summarises every source row that matches that cell's row and column labels.
Adding a value field
- Click any cell inside the PivotTable so the Fields pane appears.
- Drag Sales into the Values area. You can also tick its check box. Excel puts numeric columns in Values automatically.
- Drag Region to Rows and Product to Columns.
The layout is:
Rows: Region
Columns: Product
Values: Sum of SalesEach cell now shows total sales for one region and product pair. For the sample data, East Widget is 375 (250 + 125) and West Gadget is 180.
flowchart LRAdding more than one value field
You can drag Units into Values as well. Excel then adds a second measure. A new item called Values appears in the Columns area, and it holds the measures. Move it to Rows if you want the measures stacked by row instead of placed side by side.
Renaming and formatting a value field
The default label "Sum of Sales" is clumsy. To change it:
- Click a cell in the value field.
- Open Value Field Settings from the right-click menu.
- Type a new Custom Name, such as
Total Sales. - Click Number Format and choose a format such as Currency. Applying the format here keeps it when you refresh or rearrange the table. Formatting cells by hand does not.
The custom name must differ from every source column name. Naming a value field "Sales" fails because the source already has a column called Sales. Use "Total Sales" or add a trailing space.
Using the same field twice
You can drag one source column into Values more than once. Each copy can have its own summary or its own display setting. For example, show Sales once as a sum and again as a percentage of the grand total. The next chapters cover those options.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Value field shows "Count of Sales" | The column has blanks or text | Clean the column, then switch to Sum |
| "Field name already exists" | The custom name matches a source header | Choose a different name |
| Numbers lose formatting after refresh | Cells were formatted by hand | Use Number Format in Value Field Settings |
Exercise
Your PivotTable has Region in Rows and Product in Columns. You drag both Sales and Units into Values. Where does Excel place the new Values item, and how do you stack the two measures by row?
Show answer
Excel adds a Values item to the Columns area, so the measures sit side by side. Drag the Values item from Columns to Rows to stack them by row.