# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  Pie Chart - Remove Zero Value Labels

## Janc

I've a pie chart which is populated from a table which can have some zero value series - I don't want to remove these from the legend, but I do want to remove the 0% data labels.

Is there anyway this can be done other than individually removing 0% labels each time? 

Thanks in advance

----------


## teylyn

Hello Janc,

format the labels with custom format

0%;;;

The format syntax is

positive value;negative value;zero value;text

so if you only specify a format for the positive value and leave the others blank, separated by only the semicolons, zero values will not show in the chart.

cheers

----------


## Janc

Thanks Teylyn that works perfectly on removing the zero values  :Smilie: 

I also have legend keys on the labels which still show even with no value - can these be removed easily?

----------


## teylyn

You'll have to manually click the legend key and hit the delete button, I'm afraid, unless you want to delve into macros (which I wouldn't be able to provide).

----------


## Janc

That's fine, thank you  :Smilie:

----------


## Mahmoud_1st

Hii Janc,

you can try for hiding the data labels "legends" a simple if equation with to be like the following if the data label you want to hide named "car" for example
=if(cell with value=0,"",if(cell with value>0,"car"))

hope it helps

----------


## djmyers

*teylyn*: Thank you for your solution. It still took me a little while to figure out how to apply your fix, therefore I'm going to write it out here for the benefit of others who may struggle with this issue.

The formulas in the source table can be written in such a way as to mask the zero or error values, but they still show up in the chart.

Solution (Tested in Excel 2010.):
1. Right click on one of the chart "data labels" and choose "Format Data Labels."
2. Choose "Number" from the vertical menu on the left.
3. In the box of "Category:" items, choose "Custom."
4. In the "Format Code:" field, type "*0%;;;*" (without quotes), then click the "Add" button.
5. Highlight the code you just added, then click the "Close" button.

*Mahmoud_1st*: I'm trying to figure out how to apply your solution for hiding empty legend markers. Here's what the data field in my chart says:
='Data Summary'!$A$16:$A$21
How would I apply your fix?

Kind regards,

Dave Myers

----------


## shekharnalawade

Nice Solution. Worked for me. Thanks a lot.

----------

