Value Field Settings in Excel: How to Change Calculations
In this article
Value Field Settings in Excel allow you to change how a PivotTable calculates the data in the "Values" area. By default, Excel sums numeric data and counts text data, but you can use these settings to switch to averages, maximums, minimums, or display values as percentages of a total. To access these settings, right-click any value in your PivotTable and select Value Field Settings.
What You'll Need
- An existing Microsoft Excel workbook.
- A dataset organized in a table or a range with clear column headers.
- A PivotTable already created from that dataset.
Step-by-Step
- Create or Select Your PivotTable: Ensure you have a PivotTable active on your sheet. If you haven't made one, select your data, go to the Insert tab, and click PivotTable.
- Add a Field to the Values Area: In the PivotTable Fields pane on the right side of the screen, drag the field you want to analyze into the "Values" box. Excel will automatically apply a default calculation (usually Sum for numbers and Count for text).
- Open Value Field Settings: There are two ways to do this:
- Method A: Right-click any cell within the value column of the PivotTable and select Value Field Settings... from the context menu.
- Method B: In the PivotTable Fields pane, click the drop-down arrow next to the field name in the "Values" area and select Value Field Settings...
- Choose a Calculation Type: In the dialog box that appears, stay on the Summarize Values By tab. Select the calculation that fits your needs:
- Sum: Adds all the numbers in the field.
- Count: Counts the number of entries (useful for seeing how many transactions occurred).
- Average: Calculates the mean value.
- Max/Min: Finds the highest or lowest value in the group.
- Product: Multiplies the values together.
- Change the Display Format (Optional): Click the Number Format button in the bottom-left corner of the dialog box. Here, you can change the numbers to Currency, Accounting, or Percentage formats to make the data easier to read. Click OK to return to the main settings window.
- Show Values As a Calculation (Optional): Switch to the Show Values As tab. Instead of a raw number, you can show the data as:
- % of Grand Total: Shows how much each cell contributes to the total sum of the table.
- % of Column Total: Shows the percentage relative to the total of that specific column.
- Difference From: Compares the value to a specific base item (e.g., comparing this month's sales to last month's).
- Rename the Field: At the top of the dialog box, you will see a "Custom Name" field. You can change the name (e.g., change "Sum of Revenue" to "Total Revenue") to make your report look professional.
- Apply Changes: Click OK. The PivotTable will immediately update to reflect the new calculation or format.
Common Mistakes
- Trying to Sum Text: If your numeric data is stored as text, Excel will default to "Count" and will not allow you to "Sum" the data. You must convert the source data to numbers first.
- Naming Conflicts: Excel will not allow you to name a custom field the exact same name as a field in your source data. If you try to name a field "Sales" but your source column is already named "Sales," Excel will throw an error. To fix this, add a space at the end of the name (e.g., "Sales ").
- Confusing Count and Distinct Count: Standard "Count" counts every row. If you need to count unique items only, you must check the "Add this data to the Data Model" box when first creating the PivotTable; otherwise, "Distinct Count" will not appear in the Value Field Settings.
Tips
- Multiple Versions of the Same Field: You can drag the same field into the "Values" area multiple times. This allows you to show the "Sum of Sales" and the "Average of Sales" side-by-side in the same table.
- Use Number Formatting: Always use the "Number Format" button inside Value Field Settings rather than formatting the cells on the spreadsheet. If you format the cells manually, the formatting may disappear when you refresh the PivotTable or change the layout.
- Quick Toggle: If you frequently switch between Sum and Count, remember that the right-click menu is the fastest way to access these settings without hunting through the Fields pane.
Troubleshooting
If the settings are not working as expected, try these steps in order:
- Check for Blank Cells: If your "Average" or "Sum" seems incorrect, check your source data for blanks or errors (#N/A, #VALUE!). These can skew calculations or cause the PivotTable to default to "Count."
- Refresh the Data: If you changed the source data but the PivotTable isn't updating, right-click anywhere in the PivotTable and select Refresh.
- Verify Data Types: Select your source data column and look at the "Number" group on the Home tab. If it says "Text," change it to "General" or "Number" and then refresh your PivotTable.
- Reset Layout: If the "Show Values As" settings have made the table confusing, go back to Value Field Settings and change the "Show Values As" dropdown back to "No Calculation."
Frequently Asked Questions
Why does my PivotTable default to "Count" instead of "Sum"?
This happens if there is at least one non-numeric cell (like a space, a word, or a formula error) in the source data column. Excel treats the entire column as text and defaults to counting the entries.
Can I use a custom formula in Value Field Settings?
No, Value Field Settings only offer predefined calculations. For custom logic, you should use a "Calculated Field" via the PivotTable Analyze tab > Fields, Items, & Sets > Calculated Field.
How do I show the percentage of a total?
Open Value Field Settings, go to the "Show Values As" tab, and select "% of Grand Total" from the dropdown menu.
Will changing Value Field Settings affect my original data?
No. PivotTables are a summary layer. Any changes made in Value Field Settings only affect how the data is displayed in the report; your original source table remains untouched.
Why can't I find "Distinct Count" in the list?
Distinct Count is only available if you check the box "Add this data to the Data Model" when you first create the PivotTable. If you didn't do this, you will need to recreate the PivotTable and check that box.