Different Types of Filters in Tableau

By Eleonor Hellblom, Mon 09 January 2017, in category Business intelligence



In Tableau, there are multiple ways you can filter and restrict your data. This can be either to improve performance, to give the viewer the correct information, or to highlight something important. These filters are applied in different orders, so depending on which kind of filter you apply – it can change the view and performance drastically.


Extract Filters

When loading in your data you can choose to extract it, saving a snapshot of its current state in your workbook and hence reducing the number of times Tableau queries the data source. To further reduce the size of the data feeding into Tableau you can apply filters to the extract, which can be either by a certain dimension/measurement or by Top x Rows. A tip for enhancing performance is when you have finished with your Dashboard(s), create / alter the extract and Hide All Unused Fields, which filters out all columns not used in the workbook.



Data Source Filters

Similar to Extract Filters, Data Source Filters reduce the amount of data feeding into Tableau and restrict what data the viewer can see. With certain access rights the viewer can view all of the underlying data, so if not done in the data source, Data Source Filters can be used to control sensitive data. One thing that is important to note is that Extract and Data Source Filters are not linked - if you change back to a live connection your Data Source Filters will still be in place.



Context Filters

All filters in Tableau are applied to all rows of your data without regards to other filters. If for example you need one filter to be applied before other filters, either for performance reasons (filter out a certain category to show Top X) or if you have a FIXED function in your view that needs to be filtered, making this a Context filter will make sure it is processed first. Context Filters are limited to the view, but can be applied to Selected Sheets, All Using Same Data Source or All Using Related Data Source. While Context filters can improve performance, if they do not reduce the data enough (the rule is by 1/10 or more), the cost of computing them is too high to be beneficial.


Dimension Filters

Another name for non-aggregated filters (blue pills), such as Dimensions, Groups, Bins, Sets etc. These are applied by both dragging them on the Filters pane or right-clicking on the specific dimension and selecting Show Filter.

You can choose to either only show the things highlighted or by ticking Exclude it will instead filter out the Dimensions selected. This will be shown by a strikethrough. If you have many dimensions you can search for it, but make sure to click All or None to select/deselected all depending what you want to do.

In the filter dialog that pops up there are three tabs for Wildcard, Condition and Top. Here you can choose if you want to show the Top 10 (or by Parameter) by certain measurement or by a certain condition. The filters can be edited at any time by right clicking on the pill and Edit Filter.


Measure Filters

Aggregated filters are applied after Non-Aggregated filters, no matter what order they are shown on the Filters pane. When dragging it on, Tableau will ask you how you want to filter – in other words what aggregation to use (Sum, Avg, Median, Standard Deviation, etc.) If nothing is chosen it will automatically aggregate by Sum. The second step with give you four options: Range of values, At least, At most and Special. You can choose to drag or type in the number you want to filter on. Special is if you want to include Null values or not.


Table Calculation Filters

A Table Calculation is the last filter applied and it applies filtering after the view has been produced. So if you want to filter the view without filtering the underlying data, Table Calculations Filters are the way to go. For example, if you are showing a reference line and don’t want this to change when using a quick filter. Table Calculations are certain functions used when creating Calculated Fields such as LOOKUP, WINDOW_SUM, WINDOW_AVG, etc.