Hide 0 values in excel chart

Gabriell

New Member
Joined
Jan 9, 2017
Messages
26
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Hi Experts!

I want to create a chart in Excel and hide the values that are zero.

The percentage is calculated using a formula. If I replace zero values with =NA(), the percentage cannot be calculated, and the chart becomes empty.

Is there any solution to fix this?

Thank you in advance!
Gabor
 

Attachments

  • chart_1.JPG
    chart_1.JPG
    63.3 KB · Views: 18
  • chart_2.JPG
    chart_2.JPG
    97.7 KB · Views: 16
Something like this,
=IF(ISNUMBER(B21), B21/SUMIFS($B$21:$B$38, $B$21:$B$38, ">0"), NA())
Would there some advantage in using that much more complex formula than the ones from posts 2 & 7 which produce identical results for that column B data?

The ISNUMBER test is not required since #NA will already be returned if column B contains #N/A like your sample data. Wouldn't this do the same thing?
Excel Formula:
=B21/SUMIF(B$21:B$38,">0")
 
Upvote 0
Would there some advantage in using that much more complex formula than the ones from posts 2 & 7 which produce identical results for that column B data?

The ISNUMBER test is not required since #NA will already be returned if column B contains #N/A like your sample data. Wouldn't this do the same thing?
Excel Formula:
=B21/SUMIF(B$21:B$38,">0")
As you mentioned, when I try using those formulas, this is the chart I'm getting. Please refer the chart below.
1743986875916.png
 
Upvote 0
when I try using those formulas, this is the chart I'm getting.
It was interesting that you did not show us any of the table where rows had #N/A in column B. Here is mine with several of the short formulas, all returning the same results ...

Gabriell.xlsm
ABCDE
20Post 2Post 7Post 11
21A1124%24%24%
22B1737%37%37%
23C1328%28%28%
24D#N/A#N/A#N/A#N/A
25E12%2%2%
26F#N/A#N/A#N/A#N/A
27G24%4%4%
28H12%2%2%
29I12%2%2%
30J#N/A#N/A#N/A#N/A
31K#N/A#N/A#N/A#N/A
32L#N/A#N/A#N/A#N/A
33M#N/A#N/A#N/A#N/A
34N#N/A#N/A#N/A#N/A
35O#N/A#N/A#N/A#N/A
36P#N/A#N/A#N/A#N/A
37Q#N/A#N/A#N/A#N/A
38R#N/A#N/A#N/A#N/A
Chart (2)
Cell Formulas
RangeFormula
C21:C38C21=B21/SUM(IFERROR($B$21:$B$38, 0))
D21:D38D21=B21/AGGREGATE(9,6,B$21:B$38)
E21:E38E21=B21/SUMIF(B$21:B$38,">0")


.. and the resulting chart (using columns A & D in this case). No 0% sectors in the chart.

1744008359846.png
 
Upvote 0
It was interesting that you did not show us any of the table where rows had #N/A in column B. Here is mine with several of the short formulas, all returning the same results ...
I reviewed all the formulas this morning, and everything is working correctly. The issue was on my end, I hadn’t shown the full view of the data. I zoomed in on the chart to make things clearer. The error was mine.
1744049402982.png
 
Upvote 0

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