Data Source Filters in Tableau

Data Source Filters in Tableau are useful for creating Filters at the data Source Level. By this, we can polish the data before we start generating any report on this source. This article will show you how to create Data Source Filters with an example.

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, drag and Drop the tables, or create Custom SQL Query to extract data from the database.

Before getting into this Tableau Data Source Filters, I suggest you refer to Filters to understand the basic filter techniques. For this Tableau demo, we select the Dim Customer and Fact Internet Sales tables present in the Adventure Works DW database.

Create Data Source Filters in Tableau

To create Tableau Data Source Filters, Click on the Hyperlink ADD under the Filter section on the top right side corner. Once you click on the ADD, a new window called Edit Data Source Filters will open. To create our first data source filter, click on the Add button.

Click the Add Button to Data Source Filters in Tableau

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.

Tableau Data Source Filters on Measures

Please select the Measure field from the available fields (or Columns) list. From the screenshot below, you can see that we are choosing the Sales Amount Measure as our field.

choose the Sales Measure from the list

Once you select the Measure field (i.e., Sales Amount), a new window will be opened to create the condition to format.

For the demonstration purpose, we are leaving the maximum value and changing the minimum value to 2,471. I suggest you refer to the Filters on Measures article to understand each property present in the following window.

Adding Tableau Data Source Filters on Measures

Within the Tableau data source window, you will see the 1 under the Filter Section. Let us create one sample report to show whether our newly created one is working or not.

To do so, Drag and Drop the First Name present in the Dimension Region to the Rows Shelf and Sales Amount Measures region to the Columns Shelf. By default, the tableau will generate the Bar Chart. For better understanding, we sorted the records in Ascending order based on the Sales Amount and added the Label to the Bar chart.

Apply Data Source Filters in Tableau Report

As you can see from the above screenshot, the Sales Amount of all the records is greater than 2,471

Remove Data Source Filters in Tableau

It is easy to remove the data source filters. To do so,

  • Go to the Data Source section, and click on the Edit Hyperlink.
  • It opens the list of available sources.
  • Please select the required and click on the Remove button.
Remove Data Source Filters in Tableau

Tableau Data Source Filters on Dimensions

Please select the Dimension field from the list of available fields or Columns. From the screenshot below, you can observe that we are choosing the Gender Dimension as our field.

Selecting the Column Field

Once you select the Dimension field (i.e., Gender), a new window will be opened, as shown below. Here, we select M, meaning the data source will extract the records whose gender is Male. I suggest you refer to the Filters on Dimensions article to understand the properties in the following window.

Choose from available list

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, the tableau will generate the Bar Chart. As you can see, our report displays the Male fields because we applied to the Female Gender.

Tableau Data Source Filters on Dimensions

If you remove the Tableau Data Source Filter on Gender you can see the records that belong to both females and Males. Where each Occupation will be subdivided by Male and Female Gender. The following is the list of remaining filters.

  1. Conditional Filters
  2. Context Filters
  3. Extract Filters
  4. Quick Filters
  5. Selection Filter
  6. Slicing Filters
  7. Top and Bottom Filters
  8. Keep and Exclude Filters
  9. Action Filters
  10. Parameters
  11. String Parameters