There are plenty of times when we want to narrow our focus on certain things in our view. This can be achieved by filtering the unnecessary data points. For example, we may have some products which are loss making and we want to focus only on those products or there are certain types of products that we want to use for our analysis. In such situations, we will use Filters in Tableau. We have a Filters shelf in Tableau and anything that needs to be filtered out will be placed on that shelf.
Let us see an example where we filter out the data.
For the following recipe, we will continue working in our existing Tableau workbook and we will now switch back to our Orders data from the Sample - Superstore.xlsx
dataset.
0
in the type in box. Refer to the following image:Once we show the filter to the end user, the end user can change the filters and slice and dice the data as required. Further, in the preceding recipe, we saw that the way Tableau works with Dimensions on the Filter shelf versus Measures on the Filter shelf is very different and hence the options that we get when we drop a Dimensions on a Filter shelf will vary as against the options that we get when we drop a Measure on the Filter shelf.
Even though dates are referred to as Dimensions, they are special Dimensions and when called on the Filter shelf, the options will appear as shown in the following image:
The filters that we have created are restricted to the current worksheet and are at times referred to as Local filters. In the upcoming chapters, we will see how we can extend these filters to affect multiple worksheets on a Dashboard or even across the entire data source or multiple data sources.
Another way of filtering data is by selecting multiple marks from the view and selecting either the Keep Only or Exclude option from the Tooltip. Refer to the following image:
There is a lot more to filtering in Tableau and to read more about Filters, refer to https://onlinehelp.tableau.com/current/pro/desktop/en-us/filtering.html.