Power BI Filters are useful to restrict the data as per the requirements. For example, we can use basic filters to exclude a product from the display or display top/bottom 10 performing records. Let me show you how to create Power BI basic filters with an example.
To demonstrate the Basic Filters in Power BI, we will use the Clustered Column Chart we created in our earlier post. As you can see from the screenshot of Power BI below, we used the Country Name as the Axis field, Occupation as the Legend field, and Sales amount as the Value field.
How to use Power BI Basic Filters?
Under the Filters section, you can see the list of filters that are available in Power BI.
- Visual Level Filters: These include Filters on Dimension, Filters on Measures, Basic Filters, Advanced Filters, and Top N filters in Power BI.
- Page-Level Filters: These Page Level Filters apply to all the visuals present on the current page.
- Drill through Filters: This Drill through Filters helps you drill through a particular region, or specific category, etc.
- Report Level Filters: These Report Level Filters apply to all the pages that are present in the current Report.
Let me expand the English Country Region Name (in Short Country) to see the filter types.
Power BI Filter Types
Use the drop-down list to see the filter types available for dimension.
- Advanced Filtering: This option helps you to use more advanced options like starts with, ends with, contains, etc.
- Basic Filters: It is used to perform basic operations.
- Top N: Use this to find the top 10 records or bottom 10 records.
We want to discuss the basic filters in this example, so let me select the same. Selecting Basic Filters in Power BI displays the available rows for this column. You can use the checkboxes to select One, None (or All)
Let me select Australia, Germany, the United Kingdom, and the United States. The screenshot below shows that the clustered column chart displays the column that belongs to sleeted countries.
Required Single Selection: It restricts us from selecting one field at a time. Now you can choose only one country name at a time. As you can see, we selected the United States.
By unchecking the Power BI filter Required Single Selection property, you can select multiple fields.
Clicking that little tiny clear filter button helps you remove the existing filters.
Power BI basic Filters on Multiple dimensions
Let me expand the English Occupation column to apply filters on Occupation. Please select the Management, Professional, and Skilled Manual fields as the basic filtering values. As you can see from the screenshot below, it displays 4 countries that we selected in Countries Filters and Three occupations that we chose now.
This time, we select a single field (Require Single Selection option), i.e., Skilled Manual.
Delete Power BI Filters
Click on the tiny little Clear filter button to delete existing filters. For the demo purpose, let me delete the filter on the Occupation field.
You can see that the Occupation field has no Filters
Let me remove the filters on the Country
Now you can see there are no filters in this Clustered Column Chart.
How to use Power BI Advanced Filters?
Power BI Advanced Filters use Wildcards to restrict the report data as per the requirements. For example, we can use these Power BI advanced filters to find products that start with S, products containing Bikes, etc.
To demonstrate the Advanced Filters in Power BI, we will use the Clustered Column Chart we created in our earlier post. As you can see from the Power BI screenshot below, we used the Country Name as the Axis field, English Occupation as the Legend field, and Sales amount as the Value field.
Under the Filters section, you can see the list of available filters in Power BI. Let me expand the English Country Region Name to see the filter types. By default, the Basic Filters option is selected as the Filter type
Use the drop-down under the Filter Type to change it to Advanced filtering. The following is the list of options that are available for Power BI Advanced filtering.
- Show Items when the Value: Please select the wildcard that you want to use.
- Empty Text box: Please specify the wildcard character or expression. For example, it starts with s.
- And and Or: Same as AND and OR Operators in SQL. Use this to concatenate multiple wildcard searches.
- Empty drop down list: Please select the second wildcard that you want to use.
- Empty Text box: Please specify the character or expression for the second wildcard.
The following is the list of Power BI Filters options available under the Show items when the value section:
- Contains: When selecting this property, it checks each record against the Match Value. If it contains the match value at any position, the record will display.
- Does not Contain: It checks each record against the Match Value. If it does not contain the match value at any position, the record will display.
- Starts With: If the record starts with the match value, then the record will display.
- Does not start with: If the record does not start with the match value, then the record will display.
- is: If the record matches exactly with the match value, then the record will display.
- is not: If the record is not exactly equal to the match value, then the record will display.
- is blank: This option displays all the records with blank values.
- is not blank: It displays all the records with no blank values.
Wildcard Options
For the Power BI Advanced Filters demonstration purpose, we selected Contains as the wildcard and United as the keyword, and clicked the Apply Filter link.
The screenshot below shows that the report displays the countries that contain the united keyword.
This time we used the does not contain as the wildcard option and Canada as the keyword. From the screenshot below, you can see that the report displays all the countries except Canada.
Let me apply Power BI Advanced Filters on the English Occupation column.
We used the starts with as the wildcard and M as the keyword. The screenshot below shows that the report displays the occupations that start with M (Management and Manual).
Let me use the OR operator, and Starts with will be the Keyword. Here, we are using two wildcards as Power BI filters: the first wildcard checks whether the Occupation contains a manual keyword or not. The Second filter checks whether the occupation starts with P or not.
The below screenshot shows the Occupation that contains a manual keyword and the Occupation that starts with P.
This time we are applying multiple filters on the Country column. First, it checks whether the Country contains a united keyword or not. The Second filter checks whether the country is not France.
The below report shows the Countries that contain the United keyword and those that are not France.
Use that tiny clear filter button to remove the Power BI Advanced Filters.