Ignoring Non zero Values and sort descending in a pie chart

sujirpinna

New Member
Joined
Dec 1, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello Experts ,

I am creating a Excel PIE chart based of the below values . These percentages below are based of a SUMIF formula and may genuinely return Zero if there is no exposure. The range of the PIE chart is FIXED to the below 11 rows and two columns. My question is :

1) How do i make my PIE chart range dyamic to show only Non zero values . (If i dont , i see data Labels getting generated for all Zero values (6 observations from the below example) .
Currently i am going to "Select data" and deselecting the Zero value series.
2) How do i show the values in descending order automatically (without me sorting the below table descending on Col.B)
3) Below is how i would require the Final Pie to look like (Sort desending and Eliminate all Zero value observations)

1701490930250.png

38.5% - AUBasdad
38.5%​
28.2% - gbksada
28.2%​
13.1% - Boubasda
13.1%​
11.0% - ABC
11.0%​
9.2% - asdada
9.2%​
0.0% - sadfasdasd
0.0%​
0.0% - dsfsfsa
0.0%​
0.0% - dafsafdsa
0.0%​
0.0% - asfsafd
0.0%​
0.0% - asfdfas
0.0%​
0.0% - asfsfasf
0.0%​
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Because you have 365 on your profile, you can use the following method. Use the second table as your source data for your pie chart.
Book1
ABCDEFG
1Original dataSource data for Pie chart
2AUBasdad38.50%AUBasdad38.50%
3gbksada28.20%gbksada28.20%
4Boubasda13.10%Boubasda13.10%
5ABC11.00%ABC11.00%
6asdada9.20%asdada9.20%
7sadfasdasd0.00%
8dsfsfsa0.00%
9dafsafdsa0.00%
10asfsafd0.00%
11asfdfas0.00%
12asfsfasf0.00%
13
Sheet1
Cell Formulas
RangeFormula
E2:F6E2=FILTER(SORTBY(B2:C12,C2:C12,-1),C2:C12>0,"")
Dynamic array formulas.
 
Upvote 0
Thank you Kevin for your response . Pls would you know a method that does not involve creating a second table ?
 
Upvote 0
You may be able to work the first table's formulas to do that, but I've no idea how that table's created. Could you share your sheet using the XL2BB add in, or alternatively share your file via Google Drive, Dropbox or similar file sharing platform?
 
Upvote 0
In particular, what are the actual formulas that produce the table given in post 1?
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top