Sign in or start a free trial to avail of this feature.
10. Applying Filters to Visualizations
Filters are an alternative to slicers when you want to see only a subset of your dataset. In this lesson, we’ll see the different types of filter available, and learn how to decide between filters and slicers.
To explore more Kubicle data literacy subjects, please refer to our full library.
Lesson Goal (00:11)
The goal of this lesson is to learn about the effects of different filter types on our charts.
Visual Level Filters (00:22)
Filters allow us to focus on a specific subsection of a data set. Filters are created in the Filters pane, which is located below the Visualizations pane. We drag a field to the relevant well based on the type of filter we want to create.
Visual level filters are filters that are applied to a single visualization. Fields used to create a visualization are automatically added to the visual level filters, but we can add other fields as visual level filters as well.
Once we’ve added a field to the visual level filters well, we can set up the actual filter by selecting the arrow to open the filter. The exact filtering options vary based on the type of data. For a numeric field, like revenue, we can create a filter that shows only revenue amounts at, above, or below a certain figure. For a text field, like sales people names, we can use basic filtering to select particular sales people of interest. Alternatively, we can use advanced filtering to filter based on the sales people’s names, for example showing all sales people whose names begin with a particular letter.
Page Level and Report Level Filters (02:42)
A page level filter is a filter that affects all the visualizations on the current report page. To create this kind of filter, we drag the relevant field to the page level filter well and set up the filter as before. We cannot drag a filter from one filter type to another. Therefore to change a visual level filter to a page level filter, we must delete the visual level filter and create it again from scratch as a page level filter.
A report level filter is a filter that affects all the visualizations on every page of the current report. It is created in the same manner as the other filter types.
Comparing Slicers and Filters (03:34)
When deciding whether to use slicers or filters, there are two significant differences to consider:
First, slicers are more visible than filters, because they appear on the canvas. As a result, slicers are best when you want the user to interact with the report and filter the data themselves.
Second, filters provide more advanced selection criteria than slicers. If you want to do more than just select a subset of values from the data set, then you’ll need to use filters.
In the previous lesson we looked at slicers, which allow you to focus on a specific section of a dataset. In this lesson, we'll learn how to apply filters to our charts.
Filters perform a similar function to slicers, but do not feature on the canvas. On the right side of the screen, to the left of the visualizations pane, we can see the filters pane. Let's expand it.
If we select a visualization we can see that there are three different types of filter.
Filters on this visual, filters on this page and filters on all pages.
When a visualization is created the fields used are automatically added as filters on this visual. Note that both filters are showing all, indicating that we can see all levels of revenue and all states. Let's imagine we only want to see states where revenue is above $500,000. To accomplish this, we'll click the arrow next to the revenue filter, select is less than, and see the filter options. As revenue is numeric. We can filter for revenue at, above or below a certain level or filter where revenue is blank. We'll select greater than or equal to, type 500,000, and select apply filter.
Our chart now shows only states where revenue is above $500,000. Note that we are not limited to filtering by fields that are in the chart. Let's close the revenue filter, and drag sales person to the filters on this visual area.
The filtering options are slightly different since this is a text field. Currently we can see the basic filtering option that allows us to select one or more salespeople to include in our filter. This functionality is very similar to the slicers we saw in the previous lesson. We can also use the advanced filtering option which allows us to filter text values in various ways. For example, let's choose starts with type B and apply the filter. The chart now only shows revenues for salespeople whose names begin with the letter B. Note that our revenue filter is still active. This means our results are limited to show states where there's a combined revenue of $500,000 for sales persons with names starting with B. Let's close this filter, and clear the revenue filter by selecting the associated eraser. Now the chart shows combined revenue for all salespeople with names starting with the letter B in all states.
You may have noticed that the other chart has not been modified by our filters.
This is because we've been adding the filters to the filters on this visual area, which only affects the selected chart.
Let's change the salesperson filter so it affects all the visuals on this page.
Note that we can't drag the filter to a new area.
Instead, we must delete the existing sales person filter, then drag salesperson to the filters on this page area and recreate the filter.
Now we can see that all our visuals including slicers have changed in response to the filter.
We won't demonstrate it here but the filters on all pages area would filter every visual on every page of this report. Now that we've seen how both slicers and filters work, let's consider the differences and best use cases for each. The first difference between slicers and filters is visibility. Slicers allow the reader of your report to easily interact with your data. Filters are also accessible to readers, but not visible on the canvas.
As such, there are more commonly used when you don't expect readers to filter the data themselves.
The second difference is the selection criteria. Slicers allow you to focus on a subset of your data based on one or more fields. As we've seen, you can use filters to select a subset of your data using more advanced criteria.
For example, the first letters of a string of text, or a range of values for a numeric variable. Whether you use the filters pane or visual slicers, you will likely find yourself filtering data in most of your reports. In the next lesson, we'll look at another filtering option available in Power BI, Drillthrough Filters.