Add a filter to a report in Power BI
APPLIES TO: Power BI Desktop Power BI service
This article explains how to add a visualization filter, page filter, or report filter to a report in Power BI. You need to be able to edit a report to add filters. The examples in this article are in the Power BI service, and the steps are almost identical in Power BI Desktop.
Other articles about filters in Power BI
- Looking for an overview? Check out Filters and highlighting in Power BI reports first.
- Power BI offers many different kinds of filters, from the manual and automatic to the drillthrough and pass-through. Read about the different kinds of filters.
- After you add filters, you can format the filters in your Power BI reports to look and act the way you want.
- You interact with reports in two different views: Reading view and Editing view. This article describes how to create filters in report Editing view. Read about interacting with filters in report Reading view.
Levels of filters in the Filters pane
Whether you're using Power BI Desktop or Power BI service, the Filters pane displays along the right side of the report canvas. If you don't see the Filters pane, select the ">" icon from the upper-right corner to expand it.
You can set filters at three different levels for the report:
- The visual level.
- The page level.
- The report level.
This article explains how to set the different levels.
Add a filter to a visual
Visuals have two different kinds of filters. The fields that are in a visual are automatically filters for that visual. As the report designer, you can identify a field that isn't already the visual, and add that field directly to the Visual level filters bucket.
By the way, this article uses the Retail Analysis sample, if you'd like to install it and follow along. Install the Retail Analysis sample.
Filter with a field that's not in the visual
In Power BI Desktop, select the Report icon.
Open the Visualizations, Filters, and Fields panes, if they're not already open.
To make a visual active, select it. In this case, it's the scatter chart on the Overview page. All the fields in the visual are in the Visualizations pane. They're also listed in the Filters pane, under the Filters on this visual heading.
From the Fields pane, select the field you want to add as a new visual-level filter, and drag it into the Filters on this visual area. In this example, we drag Category to Add data fields here.
Notice Category isn't added to the visualization itself.
Select Kids. The scatter chart is filtered, but the other visuals stay the same.
If you save your report with this filter, report readers can interact with the Category filter in Reading view, selecting or clearing values.
If you drag a numeric column to the filter pane to create a visual-level filter, the filter is applied to the underlying rows of data. For example, adding a filter on the UnitCost field and setting it where UnitCost > 20 would only show data for the Product rows where the Unit Cost was greater than 20, regardless of the total Unit Cost for the data points shown in the visual.
Add a filter to an entire page
You can also add a page-level filter to filter an entire page.
In Power BI Desktop, open the Retail Analysis report.
Select the Report icon, then go to the District Monthly Sales page.
Open the Visualizations, Filters, and Fields panes, if they're not already open.
From the Fields pane, select the field you want to add as a new page-level filter, and drag it to Add data fields here in the Filters on this page area. In this case, we added District Manager.
Select the values you want to filter and set either Basic or Advanced filtering controls.
All the visualizations on the page are redrawn to reflect the change.
If you save your report with the filter, report readers can interact with the filter in Reading view, selecting or clearing values.
Add a report-level filter for an entire report
In Power BI Desktop, select the Report icon.
Open the Visualizations and Filters pane and the Fields pane, if they're not already open.
From the Fields pane, select the field you want to add as a new report-level filter, and drag it into the Report level filters area.
Select the values you want to filter.
The visuals on the active page, and on all pages in the report, change to reflect the new filter. If you save your report with the filter, report readers can interact with the filter in Reading view, selecting or clearing values.
Select the back arrow to return to the previous report page.
Reset to default
Because filters persist, when you navigate away from the report Power BI retains the filter, slicer, and other data view changes that you made. So you can pick up where you left off when you return to the report. If you don't want your filter changes to persist, select Reset to default from the top menu bar.
Keep in mind that as the report creator, whatever filters you save with the report become the default filter state for all your report readers. When they select Reset to default, that's what they return to.
Considerations and troubleshooting
- If you don't see the Fields pane, make sure you're in report Editing view.
- If you made lots of changes to the filters and want to return to the default settings, select Reset to default from the top menu bar. Remember: As the report author, whatever filters are in place when you save the report become the default filter settings.
Related content
More questions? Try the Power BI Community.