Difference Between Extract Filters and Data Source Filters

Version 2

    In Tableau 8.2 Data Source filters and Extract Filters used to work in the same manner.

    However in Tableau 9.0.4 both filters works differently.

    Extract Filter:

    As the name implies extract filters are used to filter out the data while creating the extract.

    Example: Let’s say we have database with the data for different countries as shown below

    1. USA –                    5000 rows
    2. Canada –             2000 rows
    3. India                      10000 rows
    4. Australia              1500 rows

    If we apply the Extract filters to bring the data only for USA (Country=USA), Tableau creates the Extract (.tde) just for the Country USA and ignore the data for all other countries.

    Size of the Extract is always proportionate the Extract filters.

    #of rows in the extract: 5000 rows for country USA

    Data Source Filters:

    In Tableau 9.0.4 applying Data source filters won’t change to the volume data and size of the extract. Instead data source filters applies the filters to the background query when we use any of the dimensions or measures in the visualizations.

    Example:

    If we apply the Data Source filters to bring the data only for USA (Country=USA), Tableau creates the Extract (.tde) with the full volume of the data for all countries (not only for USA) and there won’t be any relationship between the data source filters and the size of the extract.

    #of rows in the extract: 18,500 (for all countries)

     

    However there won’t be any change the way we use the dimensions and measures using both the extracts in the Visualization. Both should work as expected and will show the data only for USA.

    Conclusion:

    Extract Filters: Pre condition filters before Extract creation.

    Data Source Filters: Post Condition filters while displaying the data in the Visualizations (applies to the query while pulling the data from extract) and won’t apply during the extract creation.

    Note:

    If you apply Extract filters and Data source filters together, Data source filters overwrite the extract filters.

    (Great article, but refer to Mark Wu's reply about Order of Operations)