Data Source Filters in Tableau are useful to create Filters at data Source Level. By this, we can polish the data before we start creating any report on this data source. In this article we will show you, How to create Data Source Filters in Tableau with example. Before getting into this, I suggest you to refer Tableau Filters to understand the basic filter techniques.
Create Data Source Filters in Tableau
In this example we want to demonstrate the steps involved in creating the data source filters in tableau. To do this, Go to the Data Source, then Drag and Drop the tables, or create Custom SQL Query to extract data from the data base. For this demo, we are selecting the Dim Customer, Fact Internet Sales tables present in Adventure Works DW database.
In order to create Filters, Click on the Hyperlink ADD under the Filter section.
Once you click on the ADD, a new window called Edit Data Source Filters will be opened as shown below. To create our first data source filter, click on the Add button.
Once you click on the Add.., a new window called Add Filter will be opened, and it contains a list of all the Columns available in the Tables.
Data Source Filters on Measures
Please select the Measure filed from the list of available fields (or Columns). From the below screenshot you can see that, we are selecting the Sales Amount Measure as our filter field.
Once you select the Measure filed (i.e., Sales Amount), a new window called Filter will opened to create the filter condition. From the demonstration purpose, we are leaving the maximum value as it is, and changed the minimum value to 2,471. I suggest you to refer Tableau Filters on Measures article to understand each and every property present in the following window.
Now you can see that, the data source is showing 1 Filter under the Filter Section. Let us create one sample report to show either our newly created filter is working or not?
To do so, Drag and Drop the First Name present in the Dimension Region to Rows Shelf, and Sales Amount Measures region to Columns Shelf. By default, tableau will generate the Bar Chart as shown below. For better understanding we sorted the data in Ascending order based on the Sales Amount, and added the Data Label to the Bar chart.
As you can see from the above screenshot, Sales Amount of all the records are greater than 2,471
Remove Data Source Filters in Tableau
It is easy to remove the data source filters in tableau. To do so,
- Go to the Data Source section, and click on the Edit hyperlink.
- This will open the list of available filters on that data source.
- Select the required filter and click on the Remove button as we shown below.
Data Source Filters on Dimensions
Please select the Dimension filed from the list of available fields, or Columns. From the below screenshot you can observe that, we are selecting the Gender Dimension as our filter field.
Once you select the Dimension filed (i.e., Gender), a new window called Filter will be opened as shown below. Here we are selecting M, and it means data source will extract the data whose gender is Male. I suggest you to refer Tableau Filters on Dimensions article to understand the properties in the following window.
Drag and Drop the English Occupation, gender present in the Dimension Region to Rows Shelf, and Sales Amount Measures region to Columns Shelf. By default, tableau will generate the Bar Chart as shown below. As you can see that, our report is displaying the Male fields because we applied filters on Female Gender.
Let me remove the Filter on Gender so that you can see the actual data. From the below screenshot you can see the data that belongs to both Female, and Male
Thank You for Visiting Our Blog