Return to site

Add Percentage To Pie Chart In Excel

broken image


A fantastic question came up during last week's open lab. Is it possible to create a PivotChart pie chart that can be filtered to show only the percent of the item selected? Here is one solution for that question (and spoiler alert, it is technically not a PivotChart).

A few things before we get started…

  • First, thank you to Marsha for having this question and inspiring this Byte!
  • Second, this article assumes you have some knowledge of Tables, PivotTables, and Charts in Excel. If you don't, please come attend a session… times are listed in myTraining.
  • Lastly, this is basically a different take on the idea of a progress pie chart… and I am by no means the creative genius behind this overall idea! If you have a minute, look at some of the tutorials out there for the different use cases for these. They are mighty handy.

In this video, I'm going to show you how to create a pie chart by using Microsoft Excel. I will show you how to add data labels that are percentages and even. Apr 19, 2013 Sep 17, 2014. Cyrilbrd said: What version of excel are you using? Add labels, select labels, select format data labels, go to labels options, tick both Value and Percentage, use the separator of your liking. Open excel, go to your data table and insert a column where you want incell pie charts. Enter a formula like =CHAR (CODE ('a') + ROUND (data cell.21,1)), just replace the data cell with actual cell code. Finally change the font to 'pie charts for maps' from font dialog. There is no step 6, so go ahead and show off this cool table to your. Oct 11, 2019 You can use a pie chart, but you have to be careful with its interpretation. If you set all values in relation to the value 122, then you get new percentage values for each category, and those combined will not add up to 100%. A Pie Chart is a pictorial representation of data that is divided into slices to show the proportional data or relative data in a single chart. In this chart, all the pieces together represent 100%. This is the best option when you have a few categories to create a chart. In this article, we will see how to Create a Pie Chart in Excel Office 365.

Normally when you select a slicer or filter a Pie chart by one item, each item shows as 100%. Here is an example:

Below is a visual of a PivotChart Pie Chart…

Looks great… but when I add my slicers and filter by one item, it always shows as 100% of the total, because it is 100% of what is displayed.

What if we want to use those slicers, but also maintain the visual of the item's percent of the grand total… in other words, in this case, to still show as 36% of the whole? Some finagling is in order.

Rather than an exercise, I am going to try something different. Here is the final document… and below will be the steps I took to create it: Example Document

In the document, one sheet is the source data, and the other sheet is the final chart with slicers that will adjust the pie chart accordingly.

Click on a few slicer buttons to test it out. Pretty cool!

We originally started with source data (on the Source Data sheet in the document) that consisted of two columns: item and a number.

This first step might be optional, depending on your use case. Since data would be fluctuating in our case (e.g. new rows of data added), it was best to format as a table.

We learn about tables in Excel Essentials, and the advantages of formatting as tables in Excel Pivot Tables, so please come to a session if you are interested in learning more!

1. You can either go to the Home tab, Format as Table, or use the command Ctrl + T.

2. Pick a design if you would like (in this case, yellow for WSU).

We need a cheat column that would keep a percent constant when filtered, so a helper column was in order. You have probably noticed that formulas look different in a table… you still want to build them in the first cell of a column to carry them down.

We want the column to take the figures in column B and divide them by the total. The formula ends up looking like this: =[@Number]/SUM([Number])

Add Percentage To Pie Chart In Excel

This looks complicated, but it is very automatic. Here were my keystrokes/mouse clicks:

[click into the first cell of Column C], Type = [click on B1] / SUM [Select B2 through B7].

  1. Click on the table to activate Table Design tab.
  2. On Table Design tab, Select Summarize with PivotTable.
  3. Location of Pivot Table: on a new sheet, titled Pivot.
  4. Build the table with Item as rows, Helper Column as Values.5. Insert Slicer for Item (on the PivotTable Analyze tab).

Add Percentage To Pie Chart In Excel

So here is the twist… Instead of creating a PivotChart, we are actually going to create a chart from helper cells that reference information from the PivotTable.

1. The first helper cell references the Grand Total of the PivotTable:

[Click in B1], type = [click on the Grand Total cell of the PivotTable].

Notice how this appears in the formula bar as a GETPIVOTDATA formula in the formula bar. This cell will always return whatever Pivot Grand Total is Displayed.

2. The second helper cell, in B2, contains the formula =1-B1. So it will always read the difference of 100% from whatever the GETPIVOTDATA Apple macbook pro which to buy. result shows.

Finally, we can make the chart!

1. Select the two Helper Cells in B1 and B2.

2. Go to the Insert tab, and select the Pie Chart dropdown.

3. Select the Doughnut (it could be any of the pies, but this is the route I took for reasons you will see).

Add Percentage To Pie Chart In Excel

4. If desired, you can pick special colors by right clicking on any data point and selecting Fill. I picked some WSU colors.

The number you see in the center of the doughnut is actually a title. Remember how we learn in Excel Pivot Tables, Charts and Pictures training that a chart title can reference a specific cell? This will come in handy here.

1. Title: Click on the line of the title and press = , then click on B1

So this Title will always reference this cell, which will always reference the grand total displayed on the PivotTable.

How To Add Percentage In Excel Pie Chart

This means you will always have a number corresponding to the colors on the chart.

2. Text Box: This may be optional depending on your situation, but I inserted a Text Box at the top of the chart to read Percent of Total: Insert tab, Text Box.

3. Position Slicers: Final step was moving the Slicers and resizing them so they fit neatly on top of the Pivot Table. This was only cosmetic, and is also optional. Really there are infinite possibilities for how you could play around with final formatting with a chart like this.

It is worth mentioning that, depending on your situation, you may be able to skip the PivotTable step by incorporating a total row in your Table. This would apply if you didn't need to sum multiple entries of specific items.

You would still need to incorporate helper columns, but instead of linking to the Grand Total of the PivotTable, they could link to the Total Row sum.

So many possibilities!

What do you think? Has this sparked any ideas? Have you used pie/doughnut charts for this type of scenario before?

Congratulations to our newest Power Users! For the full gallery, and more information about the WSU Microsoft Office Power User Program, please visit: wichita.edu/poweruser

Robin Mishler

Megan Nold (not pictured)

Kylie Sharpe

Pie

A Pie Chart is a pictorial representation of data that is divided into slices to show the proportional data or relative data in a single chart. In this chart, all the pieces together represent 100%. This is the best option when you have a few categories to create a chart. In this article, we will see how to Create a Pie Chart in Excel Office 365.

Pie

This looks complicated, but it is very automatic. Here were my keystrokes/mouse clicks:

[click into the first cell of Column C], Type = [click on B1] / SUM [Select B2 through B7].

  1. Click on the table to activate Table Design tab.
  2. On Table Design tab, Select Summarize with PivotTable.
  3. Location of Pivot Table: on a new sheet, titled Pivot.
  4. Build the table with Item as rows, Helper Column as Values.5. Insert Slicer for Item (on the PivotTable Analyze tab).

Add Percentage To Pie Chart In Excel

So here is the twist… Instead of creating a PivotChart, we are actually going to create a chart from helper cells that reference information from the PivotTable.

1. The first helper cell references the Grand Total of the PivotTable:

[Click in B1], type = [click on the Grand Total cell of the PivotTable].

Notice how this appears in the formula bar as a GETPIVOTDATA formula in the formula bar. This cell will always return whatever Pivot Grand Total is Displayed.

2. The second helper cell, in B2, contains the formula =1-B1. So it will always read the difference of 100% from whatever the GETPIVOTDATA Apple macbook pro which to buy. result shows.

Finally, we can make the chart!

1. Select the two Helper Cells in B1 and B2.

2. Go to the Insert tab, and select the Pie Chart dropdown.

3. Select the Doughnut (it could be any of the pies, but this is the route I took for reasons you will see).

4. If desired, you can pick special colors by right clicking on any data point and selecting Fill. I picked some WSU colors.

The number you see in the center of the doughnut is actually a title. Remember how we learn in Excel Pivot Tables, Charts and Pictures training that a chart title can reference a specific cell? This will come in handy here.

1. Title: Click on the line of the title and press = , then click on B1

So this Title will always reference this cell, which will always reference the grand total displayed on the PivotTable.

How To Add Percentage In Excel Pie Chart

This means you will always have a number corresponding to the colors on the chart.

2. Text Box: This may be optional depending on your situation, but I inserted a Text Box at the top of the chart to read Percent of Total: Insert tab, Text Box.

3. Position Slicers: Final step was moving the Slicers and resizing them so they fit neatly on top of the Pivot Table. This was only cosmetic, and is also optional. Really there are infinite possibilities for how you could play around with final formatting with a chart like this.

It is worth mentioning that, depending on your situation, you may be able to skip the PivotTable step by incorporating a total row in your Table. This would apply if you didn't need to sum multiple entries of specific items.

You would still need to incorporate helper columns, but instead of linking to the Grand Total of the PivotTable, they could link to the Total Row sum.

So many possibilities!

What do you think? Has this sparked any ideas? Have you used pie/doughnut charts for this type of scenario before?

Congratulations to our newest Power Users! For the full gallery, and more information about the WSU Microsoft Office Power User Program, please visit: wichita.edu/poweruser

Robin Mishler

Megan Nold (not pictured)

Kylie Sharpe

A Pie Chart is a pictorial representation of data that is divided into slices to show the proportional data or relative data in a single chart. In this chart, all the pieces together represent 100%. This is the best option when you have a few categories to create a chart. In this article, we will see how to Create a Pie Chart in Excel Office 365.

To know more different types of Excel Charts, refer to this link.

Jump To:

Steps to Create a Pie Chart:

  • You need to open the worksheet and select the data that you want to create a chart.
  • On the Insert Tab, select the Pieor DoughnutChart drop-down list under the Charts section.
  • Then, you need to select the 2-D Pie chart option from the menu.
  • Now, you will get the chart as shown in the below example image.

Pros and Cons:

Pros:

  • It is a simple and compact representation of data.
  • You can be read 'at a glance' if the chart has minimum categories.
  • Excel will calculate the percentage values automatically.

Cons:

  • It is hard to compare the relative size of the slices.
  • Limited to part-to-whole data.
  • The pie chart is poor at showing the change over time.

Conclusion:

In the above article, you can easily understand the steps to Create a Pie Chart in Excel Office 365. Don't forget to share your feedback in the comment section. Thanks for visiting Geek Excel. Keep Learning!





broken image