To add a filter to an Excel line chart in Microsoft 365 for Windows, select the chart, click the funnel-shaped Chart Filters button beside it, choose the series or category values to show, and click Apply. For filters that viewers can change more flexibly, filter the source table or use a PivotChart with a slicer.
What a line chart filter changes
A chart filter controls which data appears in the chart without deleting or editing the underlying values. In a standard line chart, you can usually filter two kinds of items: data series and categories. A series is a line, such as sales for one product; categories are the labels along the horizontal axis, such as months or regions.
For example, a chart might plot monthly sales for three products across January through December. In Chart Filters, you can hide two product series to focus on one, or hide selected months to compare only a particular period. Excel updates the displayed chart when you apply the choices.
This is a display filter, not a data-cleaning operation. It does not remove rows from the worksheet, change the source values, or automatically create a dropdown control for every person who views the workbook. The chart filter is useful for quick inspection; a table filter or slicer may be a better fit for a report that other people will interact with.
Add or change a filter with Chart Filters
- Click the line chart once to select it. The Chart Design and Format tabs should appear on the ribbon.
- Look beside the chart for the Chart Elements, Chart Styles, and Chart Filters buttons. Click the funnel-shaped Chart Filters button.
- In the Series section, check the lines you want to show and clear the ones you want to hide. In the Categories section, check the axis labels to include.
- Click Apply. Excel redraws the chart using the selected items.
If the funnel is not visible, first make sure the chart itself—not a cell or an individual line—is selected. In some window sizes, the chart may be too close to the edge of the worksheet for the floating buttons to be obvious. You can also use the ribbon: select the chart, open Chart Design, and choose Select Data to adjust the chart’s series and category ranges. Select Data is a more manual way to change what the chart references; it is not the same as applying a temporary chart filter.
To restore everything, reopen Chart Filters, select all the series and categories you want included, and click Apply. Filtering a chart is reversible, so it is generally safe to explore. If you need the worksheet’s rows themselves to be hidden, use a worksheet or table filter instead.
Choose between filtering series and categories
Filtering series is helpful when the chart is too crowded or when the reader wants to compare a subset of groups. Suppose a line chart shows revenue for eight departments over a year. Clearing six departments in the Series list leaves two lines visible, while retaining the same month axis and source data. This can make trends easier to read without rebuilding the chart.
Filtering categories changes which points or time periods appear along the horizontal axis. If the chart has monthly categories, you might show only the first quarter. The remaining months are hidden from the chart, but they are still present in the worksheet. Category filtering is not necessarily a date-range control: it selects the chart’s existing category labels. If you need a user to choose arbitrary start and end dates, use a table filter or build a more deliberate interactive report.
- Use a series filter to focus on particular products, departments, or locations.
- Use a category filter to hide particular months, names, or other horizontal-axis labels.
- Use both when you need a smaller view of a large chart, while remembering that hidden items remain in the source.
When several lines overlap, filtering can also help diagnose a chart. Show one series at a time to see whether a missing-looking line is actually present but obscured by another line. If the values are very different in scale, however, hiding lines may only conceal the scale problem; consider whether a different chart design or separate charts would communicate the data more clearly.
Filter the chart by filtering its source table
A worksheet filter is often the better choice when the chart should follow the visible records in a dataset. Convert a well-structured range into an Excel table with Insert > Table, making sure the table has a header row. Add a chart based on the table, then use the dropdowns in the table headers to filter the records. For instance, filter a Region column to show North only; a chart based on the table will normally plot the visible rows and update with the filtered data.
Excel charts typically omit data in hidden rows and columns. That is why a chart can respond to a table filter even though the table filter is not the chart’s own Chart Filters control. If the chart continues showing filtered-out records, select it and go to Chart Design > Select Data > Hidden and Empty Cells. Check whether Show data in hidden rows and columns is enabled; when it is, hidden records can still be plotted. Clear that option if you want hidden rows excluded.
Table filters change which rows are visible in the worksheet, but they do not erase the records. They also filter the table for anyone looking at that workbook view, rather than providing a separate, private filter state for each chart viewer. If a chart should respond to several criteria, confirm that its source is the table and test the actual header filters, including any other filters already applied to the table.
Use a slicer for a more interactive chart
A slicer is a set of clickable buttons for filtering a PivotTable or PivotChart. It can be easier for report viewers than opening header dropdowns, and it makes the available choices visible on the sheet. For example, a slicer for Region can let a reader click North, South, or another region and see the PivotChart update.
To set one up, create a PivotTable from the source data, create a PivotChart from that PivotTable, and select the PivotTable. In Excel for Microsoft 365 on Windows, choose PivotTable Analyze > Insert Slicer, select a field such as Region, and click OK. Place the slicer near the chart and use its buttons to filter. A PivotChart is tied to its PivotTable, so it uses PivotTable fields and filters rather than behaving exactly like an ordinary chart with a separate Chart Filters list.
Slicers can filter more than one PivotTable when those PivotTables share a compatible data source and the slicer is connected to them. Select the slicer and use the Slicer tab’s Report Connections command to choose the PivotTables it should control. The command may be labeled PivotTable Connections in some Excel builds. This is useful for coordinated dashboards, but it requires checking that each chart is based on a PivotTable the slicer can control.
What about formulas or a dropdown selector?
The Chart Filters funnel is not a cell-based dropdown, and it does not let a workbook designer define every possible rule. If you want a reader to select one product from a cell and have a chart respond, a PivotChart with a slicer is often the most maintainable no-code approach. A table filter is simpler when viewers should filter the records themselves.
More customized dashboards can use a selection cell, helper data, and formulas to prepare a filtered series for a chart. Microsoft 365 includes dynamic-array functions such as FILTER, but a formula-driven setup needs careful handling of the chart’s source range, empty results, and changing output size. It is not necessary just to hide a few lines in a chart. Choose it when the interaction or calculation needs cannot be met by chart filters, table filters, or PivotTable tools, and test the workbook in the Excel versions your audience uses.
Another common misconception is that selecting a chart filter permanently filters the worksheet. It does not. Likewise, filtering a chart does not usually change the values used in totals or formulas elsewhere. If the goal is to calculate using only a subset of rows, use an appropriate worksheet or table filter and a calculation designed for filtered data, or build the calculation separately. A chart’s appearance alone should not be treated as proof that the source data has been restricted.
Common problems and how to fix them
- The funnel button is missing: Select the chart area, not a line or an axis. The floating Chart Filters button is a Windows chart control and can be hard to see in a compact window. Use Chart Design > Select Data for manual series changes, or use the relevant PivotTable controls for a PivotChart.
- The chart does not change when the table is filtered: Check that the chart references the filtered table, then inspect Chart Design > Select Data > Hidden and Empty Cells. If Show data in hidden rows and columns is selected, clear it to exclude hidden rows.
- A series or month is not listed: The chart filter only offers items represented by the chart’s current source. Use Chart Design > Select Data to inspect the chart data range and series definitions. A missing label may be outside that range or absent from the source data.
- The line chart has gaps: A blank cell, a filtered category, or a genuinely missing observation can produce a gap. In Chart Design > Select Data > Hidden and Empty Cells, review the empty-cell display setting. Connecting points across empty cells can imply continuity, so use that choice only when it accurately represents the data.
- The chart looks different on another computer: Excel for Mac and Excel for the web may arrange chart controls differently, and available editing features can vary. On Mac, select the chart and look under Chart Design for Select Data rather than relying on the Windows floating funnel. In the web app, use the chart controls available in that version; if a command is missing, open the workbook in desktop Excel.
Which filtering method should you use?
For a quick, chart-only change, use Chart Filters. It is the shortest route to hiding a series or category and does not require changing the worksheet view. For a chart that should track filtered source records, use an Excel table and its header filters, and verify the hidden-rows setting. For a polished report where viewers need clear buttons, use a PivotChart with slicers. For specialized rules or a selection-cell interface, consider helper formulas only after simpler options prove insufficient.
Before sharing a workbook, test the filter from the perspective of the person who will use it. Check whether the chart title, axis labels, legend, and any explanatory notes still make sense when some series or categories are hidden. A chart can be technically filtered yet misleading if its remaining lines are not clearly identified or if the reader assumes hidden data has been deleted.
Frequently Asked Questions
Can I add a dropdown filter directly to a regular Excel line chart?
A regular chart’s Chart Filters button lets you select series and categories, but it is not a worksheet-cell dropdown. For clickable report controls, use a slicer with a PivotChart or filter the source table.
Does filtering a line chart delete the hidden data?
No. Chart Filters change what the chart displays; they do not delete or edit the source values. Worksheet and table filters also hide records rather than removing them.
Can I filter a line chart by date?
You can select date categories in Chart Filters if they appear as chart categories. For easier date-range filtering, use a table’s date filter or create a PivotChart and use an appropriate date or timeline control when available for the PivotTable.
Why does my chart still show rows hidden by a filter?
The chart may be set to plot data in hidden rows and columns. Select the chart, open Chart Design > Select Data > Hidden and Empty Cells, and clear Show data in hidden rows and columns if you want hidden records excluded.
Can one slicer control multiple line charts?
Yes, when the charts are PivotCharts based on compatible PivotTables. Select the slicer and use Report Connections or PivotTable Connections to connect it to each eligible PivotTable. A slicer does not automatically control ordinary charts.
Related
- What Are Progress Dots Called in Apps and Websites?
- Security Risk in Excel: How to Find and Check It Safely
- VBE Editor in Windows: Name, Access, and Uses
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Sort Pivot Tables in Google Sheets: Steps and TipsTo sort a pivot table in Google Sheets, click inside it and use the Pivot table editor: under…
- How to Insert a Dynamic Excel Chart in PowerPointTo insert a dynamic Excel chart in PowerPoint for Microsoft 365 on Windows, select the chart in Excel,…
- Excel Pivot Chart: Hide Zero Values the Right WayYes. In Excel for Microsoft 365 on Windows, hide zero-value categories in a PivotChart by applying a value…
- Black Bullseye Chart in Excel: How to Create OneA black bullseye chart is usually a custom target graphic made from concentric circles; it is not a…
- Excel Bar Chart Reverse Order: Steps, Options, and FixesYes. Select the bar chart’s category axis, open Format Axis, and under Axis Options turn on Categories in…
- Excel Line Chart Blanks: Gaps, Zeros, or Connected LinesYes. In Excel for Microsoft 365 on Windows, you can choose whether blank cells in a line chart…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.