How to Create Pie Chart for Sum by Category in Excel (2 Quick Methods)

We have a dataset with a list of products that fall into three categories and their Sales Quantity. The categories are Laptop, Headphone, and Smartwatch. We want to create a Pie Chart for the sum by category.

Dataset


Method 1 – Using the SUMIF Function

Steps:

  • Select cell G5 and insert the following formula.
=SUMIF(D5:D13,"Laptop",C5:C13)

Cell G5 is the cell indicating the Sales Quantity of the category Laptop.

Using SUMIF Function to Create Pie Chart for Sum by Category

  • Select cell G6 and insert the following formula.
=SUMIF(D5:D13,"Headphone",C5:C13)

Cell G6 is the cell indicating the Sales Quantity of the category Headphone.

Using SUMIF Function

  • Select cell G7 and insert the following formula.
=SUMIF(D5:D13,"Smartwatch",C5:C13)

Cell G7 is the cell indicating the Sales Quantity of the category Smartwatch.

Using SUMIF Function to Create Pie Chart for Sum by Category

  • Select the range F4:G7.
  • Go to the Insert tab.
  • Select Insert Pie or Doughnut Chart.
  • Click on Pie to insert a Pie Chart.

Using SUMIF Function to Create Pie Chart for Sum by Category

After inserting the Pie Chart, we will format the chart and add elements to make the chart more understandable and visually appealing.

  • Double-click on the data series to format the data series according to your preference.
  • Click on Chart Element and go to Data Labels and choose Center to add the Sales Quantity value to the center of each proportion.

Using SUMIF Function to Create Pie Chart for Sum by Category

You will have your output as shown in the below screenshot.

Using SUMIF Function to Create Pie Chart for Sum by Category

Read More: How to Group Small Values in Excel Pie Chart


Method 2 – Utilizing a Pivot Table

Steps:

  • Select the whole dataset.
  • Go to the Insert tab.
  • Select Pivot Table.
  • Click on From Table/Range.

Utilizing Pivot Table

  • Select Existing Worksheet, or the worksheet you want to keep your Pivot Table in.
  • In Location, select the cell you want your Pivot Table to start. We chose cell F4.
  • Click on OK.

Utilizing Pivot Table

  • From Pivot Table Fields, select Sales Quantity and Category.
  • Drag Category to Rows and Sales Quantity to Values field.

Utilizing Pivot Table

  • You will have the Pivot Table as shown in the screenshot below.

Utilizing Pivot Table

  • Select any cell on the Pivot Table.
  • Go to the tab PivotTable Analyze.
  • Click on PivotChart.

Utilizing Pivot Table to Make Pie Chart for Sum by Category

  • Go to Pie from the All Charts options.
  • Select Pie and click on OK.

Utilizing Pivot Table to Make Pie Chart for Sum by Category

  • Format and add elements to the chart as mentioned in the above method.

Utilizing Pivot Table to Make Pie Chart for Sum by Category

Note: This method is dynamic. That means if you add a new entry with its category and update the PivotTable range, you’ll get an updated chart automatically.

Read More: [Solved]: Excel Pie Chart Not Grouping Data


How to Sum Data and Create a Pie Chart in Excel

We have a dataset where we have the Sales Quantity of three different products for two different weeks as shown in the screenshot below. We want to sum the Sales Quantity for each of the products over the weeks and create a Pie Chart.

How to Sum Data and Create a Pie Chart in Excel

Steps:

  • Select the cell you want to keep your consolidated data.
  • Go to the Data tab.
  • From Data Tools, select Consolidate.

How to Sum Data and Create a Pie Chart in Excel

  • For Function, select Sum.
  • In Reference, select the range B5 to F8.
  • For Use labels in, check the boxes for Top Row and Left Column.
  • Click on OK.

How to Sum Data and Create a Pie Chart in Excel

  • Select the range B11:C14, which represents the range for the consolidated data.
  • Go to the Insert tab.
  • Select Insert Pie or Doughnut Chart.
  • Click on Pie to insert a Pie Chart.

How to Sum Data and Create a Pie Chart in Excel

  • Format and add elements to the chart as mentioned in the above method.

How to Sum Data and Create a Pie Chart in Excel

Read More: How to Make Pie Chart by Count of Values in Excel


Things to Remember

  • In Excel, you can not directly insert a Pie Chart for sum by category.
  • In order to create a Pie Chart for sum by category, you need to categorize the data using other functions or features first.
  • You can use a Bar Chart in Excel which will automatically give you a chart for sum by category.

Download the Practice Workbook


Related Articles


<< Go Back To Excel Pie ChartExcel ChartsLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sowmik Chowdhury
Sowmik Chowdhury

Sowmik Chowdhuri, with a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, serves as a crucial Excel & VBA Content Developer at ExcelDemy. His profound passion for research and innovation seamlessly aligns with his unwavering dedication to Excel. In this role, Sowmik not only skillfully addresses challenging issues but also demonstrates enthusiasm and expertise in gracefully navigating intricate situations, highlighting his steadfast commitment to consistently deliver content of exceptional quality and value. Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo