Tableau Filters are used to restrict the data as per the client requirements. For example, we can exclude a region from display, or we can display top 10 performing records, or low performing records etc. Before we start our example, It is important to understand the Order of the Operations in which tableau will execute the filters in our workbook. And the order would be:
In this article we will show you, How create basic Tableau filters with example?. For this we are going to use the data source that we created in our previous article so, Please visit Data Labels in Tableau Reports article to understand the Data Source. Next, we created two Hierarchies that represent the Country, and Products.
Below screenshot will show you the dimensions, and measures preview
Creating Tableau Filters
First, Drag and Drop the City Name from Dimension Region to Rows Shelf, and Sales Amount Measures region to Columns Shelf. By default, tableau will generate the Bar Chart as shown below. Please remember, We have 269 Rows in our Tableau Report
Approach 1 to create Filters in Tableau
Tableau allows you to select the individual data points, or a group of data points from the report. Once you selected the data points, you will get two options called Keep Only, and Exclude. Selecting either of the two means, you are using the Filters indeed.
For example, If you observe the below screenshot, We are selecting some random 16 Cities from the bar chart. Next, we are using Keep only option. This means we are using the filter stating that, Cities with the selected names should be displayed.
As you can see from the below screenshot, report is displaying the records that we selected in the previous step. And most importantly, City dimension is appeared at Filters Shelf.
Approach 2 to create Tableau Filters
In this example, We will use the Exclude Option. If you observe the below screenshot, We are selecting first 96 Cities from the bar chart. Next, we are using Exclude option. This means we are using the filter stating that, Cities with the selected names should be restricted from display.
From the below screenshot you can observe that, tableau report is displaying the cities starting with E.
Though above examples is enough to understand the basic filters in Tableau. I would like to provide two more examples using the Tableau Maps. It might be useful for further reference.
Creating Filters in Tableau Maps
Drag and Drop the Sales Amount Measures region to Columns Shelf, and City Name from Dimension Region to Rows Shelf. By default, tableau will generate the Bar Chart so Please change it to Map using Show Me Shelf as we shown below. As you can see, Tableau Map is stating that, there are 128 Unknown regions.
Double click on it, will open the following window with multiple option. It is completely different topic and we will discuss the options in Maps section. For now, we are choosing the second option (filter data). This means, we are applying the filters on the Map, and insisting the map to not show those 128 regions.
Now you can see the Map that excluded those 128 regions. This is also called as filtering data.
Create Tableau Filters using Exclude Option
If you observe the below screenshot, We are selecting the data points from the Europe Region from the Map. Next, we are using Exclude option. This means we are using the filter stating that, Sales Amount with that Region should be restricted from display.
Now you can see the map without the European data.
Create Tableau Filters using Keep Only Option
If you observe the below screenshot, We are selecting the data points from the United States Region from the Map. Next, we are using Keep Only option. This means we are using the conditional filter stating that, Sales Amount with the United States Region should only be display.
Below screenshot will show the filter Map.
Thank You for Visiting Our Blog