Table of Contents
Excel Pivot Table is a powerful tool that allows users to analyze and summarize large amounts of data. One useful feature of Pivot Tables is the ability to calculate both the sum and count of the same field. This means that users can easily see the total value of a specific data field, as well as the number of entries for that field. To do this, simply add the desired field to both the “Values” and “Summarize Values By” sections of the Pivot Table. This will automatically display both the sum and count in the table, providing a comprehensive understanding of the data. This feature is particularly useful for financial data, sales data, and any other data that requires both the total value and number of entries to be analyzed.
Excel Pivot Table: Calculate Sum & Count of Same Field
Often you may want to calculate the sum and the count of the same field in a pivot table in Excel.
You can easily do this by dragging the same field into the Values box twice when creating a pivot table.
The following example shows exactly how to do so.
Example: Calculate Sum & Count of Same Field in Excel Pivot Table
Suppose we have the following dataset in Excel that shows the sales of various products:

Now suppose we insert the following pivot table to summarize the sum of sales by product:

Now suppose we would also like to summarize the count of sales for each product.
To do so, we can simply drag the Sales value in the PivotTable Fields panel to the Values box again:

Next, click on the dropdown arrow next to Sum of Sales2 and click on Value Field Settings:

In the new window that appears, click Count and then click OK:

A new field will be added to the pivot table that shows the count of sales:


The pivot table now shows the sum of sales and the count of sales for each product.
Additional Resources
The following tutorials explain how to perform other common operations in Excel:
Cite this article
stats writer (2024). How can I use Excel Pivot Table to calculate the sum and count of the same field?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-excel-pivot-table-to-calculate-the-sum-and-count-of-the-same-field/
stats writer. "How can I use Excel Pivot Table to calculate the sum and count of the same field?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-excel-pivot-table-to-calculate-the-sum-and-count-of-the-same-field/.
stats writer. "How can I use Excel Pivot Table to calculate the sum and count of the same field?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-excel-pivot-table-to-calculate-the-sum-and-count-of-the-same-field/.
stats writer (2024) 'How can I use Excel Pivot Table to calculate the sum and count of the same field?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-excel-pivot-table-to-calculate-the-sum-and-count-of-the-same-field/.
[1] stats writer, "How can I use Excel Pivot Table to calculate the sum and count of the same field?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use Excel Pivot Table to calculate the sum and count of the same field?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
