In this article, we are going to show you 2 methods to make a Pie Chart by the count of values in Excel.
How to Make Pie Chart by Count of Values in Excel: 2 Handy Approaches
To demonstrate the methods, we have picked a dataset with 3 columns: “Company“, “Product“, and “Sold (Qty)“. First, we will use two functions to count the values and then PivotTable to achieve the target of this article. Moreover, here is the snapshot of our dataset and the Pie Chart.
1. Applying Combined Functions to Make Pie Chart by Count of Values
In this section, we will use the UNIQUE and COUNTIF functions to count the values of the Product column. Then, from the Insert Charts command, we plot the Pie Chart by the count of values in Excel. Remember, the UNIQUE function is available in Office 365 only. Without further ado, let us show you the guide.
Steps:
- To begin with, we have formatted the cell range B19:C23.
- Next, type the following formula in cell B20.
=UNIQUE(C5:C17)
- This formula finds the unique values from the selected cell range.
- Then, press ENTER.
- Afterward, select the cell range C20:C23 and type this formula.
=COUNTIF($C$5:$C$17,B20)
- This formula finds the number of occurrences of the unique values in the cell range from the dataset. Moreover, it is mandatory to use the absolute cell reference in this case.
- After that, press CTRL+ENTER.
- So, this will AutoFill the formula to the cells.
- Now, we will insert the Pie Chart.
- Therefore, select the cell range B20:C23.
- Then, from the Insert tab → Insert Pie or Doughnut Chart → select Pie.
- Firstly, select the graph.
- Secondly, from the Chart Elements → Legend → select Right. This will move the Legend to the right side of the graph.
- Thirdly, from the Data Labels → select “More Options…”.
- Then, the Format Data Labels box will appear on the right side of our Workbook.
- After that, select Category Name, and Legend Key from the Label Contains section.
- Next, select Outside End from the Label Position section.
- By doing so, the Pie Chart will look like this.
- Then, we added a Chart Title, increased font size, and moved the Data Labels a bit to show the Leader Lines.
- Finally, this is the output of our first method.
Read More: How to Show Percentage and Value in Excel Pie Chart
2. Using PivotTable to Make Pie Chart by Count of Values in Excel
For the last method, we will find the unique values and their counts by using the PivotTable feature.
Steps:
- At first, select the cell range C4:D17 and from the Insert tab → select PivotTable.
- So, the “PivotTable from table or range” dialog box will pop up.
- Next, select Existing Worksheet and cell B19 as the output location.
- Then, press OK.
- Thus, it brings a blank PivotTable.
- Next, from the PivotTable Fields window, drag the Product field to the Rows and Values areas.
- After that, it will show us the unique values and their counts.
- Then, select the PivotTable, and from the PivotTable Analyze tab → select PivotChart.
- So, the Insert Chart window will appear.
- Then, select Pie and press OK.
- Consequently, it will show the basic Pie Chart with the count of values.
- Lastly, as shown in method 1, we have modified the graph and the final step should look like this.
Read More: How to Show Percentage in Excel Pie Chart
Practice Section
We have added a practice dataset for each method in the Excel file. Therefore, you can follow along with our methods easily.
Download Practice Workbook
Conclusion
We have shown you 2 handy approaches to how to make a Pie Chart by the count of values in Excel. If you face any problems regarding these methods or have any feedback for me, feel free to comment below. Moreover, you can visit our site ExcelDemy for more Excel-related articles. Thanks for reading, keep excelling!
Related Articles
- How to Show Percentage in Legend in Excel Pie Chart
- How to Show Total in Excel Pie Chart
- How to Create Pie Chart for Sum by Category in Excel
- How to Group Small Values in Excel Pie Chart
- [Solved]: Excel Pie Chart Not Grouping Data
- How to Create Pie Chart Legend with Values in Excel
<< Go Back To Excel Pie Chart | Excel Charts | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!