Refining Data in Tableau
Filters in Tableau will assist us to visualize data efficiently and quickly. Depending upon the nature of data and the requirement primarily we have 6 types of tableau filters. Each filter is designed to work on a specific situation like when the column contains numerical values or strings? is it a measure or a dimension? Etc. Applying these filters are very straightforward and simple, and can be done in seconds.
Imagine you have a spreadsheet that contains 10000 rows of data and you need only 10% of this data for your job. Wouldn’t it be time-saving if you work on only this 10% for data instead of working on the whole sheet?
In most of cases, the answer would be ‘Yes’. Therefore, refining data plays a vital role in Data Visualization.
Tableau a Data Visualization tool and also, one of the market leaders in the year 2019 provides an ability to organize and view data according to our requirements with the help of Various filter options available in Tableau.
Types of Filters in Tableau
Below are the different types of Filters in Tableau:
- Dimension Filter (Filter Shelf)
- Measure Filter (Filter Shelf)
- Quick Filter
- Context Filter
- Extract Filter (Data Source)
- Data Source Filters
1. Dimension Filter
Dimension filter is applied to non-aggregate columns like Region, Customer Name, Country, etc. In this filter option, we filter data according to categories which we require for our task.
How to Use Dimension Filter?
To apply Dimension, drag the Dimension on which you want to apply the filter (in our case Region) to the Filter Shelf as shown in the picture in RED. After dragging the Measure filter window will open which will have four tabs as follows:
In this tab, we can include/exclude the fields on which we want to apply filter. Tableau also provided options like ALL, NONE, Custom Value list and USE ALL which helps us to easily select our required filter columns even if we have a large number of columns.
We can use a wildcard filter to include/exclude the fields which start, ends, contains or exactly matches the value in which we enter the text box. For Example, if you need records of customers whose name is James then you can use the ‘contains’ option as shown in the picture below.
We can use condition filters in two ways as follows:
- By Field
- By Formula
Here we can select a field from the available dimensions and measures. Then we can select the different aggregate functions from the drop-down, such as SUM, AVERAGE, COUNT, etc. and also chose the condition whether it should be <, > <=, >= or =. We can also provide a range of Maximum and Minimum values.
Here we can specify fields that we want to filter by typing the corresponding formula in the formula box. For Example, In the below picture we are filtering our records whose balance is less than 5000.
In this tab, we can visualize Top “N” or Bottom “N” records based on the filter “by field or by the formula” similar to Condition tab. Here “N” can be any number greater than zero. With the help of this option, we can get Top/Bottom 5,3 or 10, etc. records as per our requirement.
2. Measure Filter
Measure filter is applied on aggregate columns like Age and Balance. In this filter option, we filter data according to aggregate functions that we require for our task.
How to Apply Measure Filter?
To apply measure filter simply drag one of the measures in the filter shelf as shown below in RED. Then the Filter Field window will open then select aggregate function according to your requirement.
After selecting the aggregate function (All Values in our case) we can select how we want to apply filter condition from the 4 tabs as follows.
- Range of values
Here we need to provide the start and end value of the range which we want to view in our result. (In the example below, we can select any age between 15 and 64. If we want to find the result for age between 30 and 40 then we need to specify 30 as start value and 40 and end value.)
- At least
Here we need to provide only the start point of our range.
- At most
Here we need to provide only the endpoint of our range.
Here we can choose between null, non-null and All values
3. Quick Filter
Quick filter or custom filter is mainly used in cases where one needs to quickly visualize the filter data with a single and multiple value list.
How to apply Quick Filter?
- To Apply Quick filter, you need to have a measure or a dimension in the filter shelf. Then you need to right-click on the field (in our case, it’s REGION) and check “Show Filter”.
- Then you will find a new checkbox in the worksheet, you can visualize the data according to different categories (in our case, it’s England, Scotland, etc.)
- You can also select the type of quick filter by clicking on the down arrow in the checkbox and choose between single, multiple and wildcard match values as shown in the picture on the right.
4. Context Filter
- A Context filter is a filter option that can create a separate group of data out of the original data source and compute the selections made in the worksheet.
- Once the context filter is applied it appears in gray color as shown in the picture.
- Context Filter can be handy in the cases where fixed Top or Bottom records are required for different categorical fields.
5. Extract and Data Source Filters
Extract and Data Source Filter are the filters which are usually applied before moving to the worksheet. These filters are useful as using these we can filter out the unnecessary data at the beginning itself.
The main difference between extract and Data Source filters is the filter result of the data source filter is visible instantly however the filter result of the extract is visible only after moving to the worksheet tab (Sheet1).
How to apply Extract Filter?
To apply this filter first select the connection type as Extract then click on edit after which you need to click on add and then select a field, and depending on what type of field you select (a measure or a dimension) a filter window will open. The rest of the things are similar to Dimension or Measure filter.
How to apply Data Source Filter?
To apply this filter, you need to click on Add (highlighted in green) then you need to add fields on which you want to apply the filter, Rest of the things are similar to Dimension or Measure filter.
Tableau has provided various options to filter and restrict the source data as per our requirements. These filter options help us to visualize only the required information which saves our time, processing power, memory, and efforts. Quick filter and its Menu types can help us to visualize data very quickly and efficiently. Measure and Dimension filters are like the base of Filter options in Tableau. Here we enough option to filter any type of data as per our requirements.
This is a guide to Filters in Tableau. Here we discuss the Types of Filters in Tableau and How to Apply the Filters step by step with the Screenshots. You may also look at the following article to learn more –