Show Pie Chart Data Labels Only for Positive Sales Values in Excel
Question details
Display category names and values on a pie chart only for sales totals greater than zero.

- Product
- Microsoft Excel pie chart
- Device & OS
- not provided
- Scenario
- The user wants a pie chart to show data labels for positive sales categories while excluding categories with zero sales.
- Observed behavior
- Zero-value categories are included in the chart source and may appear in the chart labels or legend.
Make sure your source table has one column for category names and one column for sales totals. Keep the original data range unchanged and create a separate filtered range for the chart.
Create a filtered chart source with the FILTER function
Use this method in Excel versions that support the FILTER function to automatically exclude zero sales values as the source data changes.
A pie chart can only label the data points included in its source range. Filtering the category and value columns before creating the chart prevents zero-value categories from appearing in labels, the legend, or slices.
In an empty area of the worksheet, enter =FILTER(A2:B10,B2:B10>0), replacing A2:B10 with your category-and-sales range and B2:B10 with your sales values.
Select the spilled filtered results, then go to Insert > Pie or Doughnut Chart > 2-D Pie.
Select the chart, click the Chart Elements button (+), select Data Labels, then open More Options and check Category Name and Value.
Review the chart and legend. Only rows with sales values greater than zero should be present in the pie chart.

Filter positive rows and build the pie chart from visible data
Use this method when FILTER is unavailable or when you want to create a static chart from currently positive sales values.
Show only positive sales labels in a WPS Spreadsheets pie chart
WPS Spreadsheets lets you filter out zero sales rows before creating a pie chart, so the chart contains only meaningful slices, category names, and values. Use the filtered results as a separate chart source, then enable category and value data labels.
- 1. Select the sales table: In WPS Spreadsheets, select the columns containing category names and sales totals.
- 2. Filter out zero sales values: Choose Data > Filter, open the sales-column filter arrow, and set a number condition for values greater than 0.
- 3. Copy the visible positive rows: Copy the remaining visible category and sales rows to a blank area of the worksheet for use as the chart source.
- 4. Insert a pie chart: Select the copied range and choose Insert > Chart > Pie to create the chart from positive sales values only.
- 5. Enable chart data labels: Select the chart, open Chart Tools, add Data Labels, and choose Category Name and Value in the label settings.

Frequently Asked Questions
Why do zero-value categories still appear in my pie chart labels?
The chart is still using a source range that includes those rows. Create a filtered source range containing only values greater than 0, then create the pie chart from that range.
Can I hide only zero data labels without removing the pie chart category?
A pie slice with a zero value has no visible size, but it can still be included in the source data. The most reliable way to remove its label and legend entry is to exclude the zero-value row from the chart source.
What FILTER formula can I use for category names and sales values?
If categories are in A2:A10 and sales totals are in B2:B10, use =FILTER(A2:B10,B2:B10>0). Build the pie chart from the returned results.
How do I show both the category name and sales value on a pie chart?
Select the pie chart, click Chart Elements (+) > Data Labels > More Options, then select Category Name and Value under Label Options.
Will the pie chart update when a sales value changes from zero to positive?
Yes, if the chart is based on a dynamic FILTER output range. When the source value becomes greater than zero, the row is returned by FILTER and can appear in the chart.




