There are many ways to filter data in Tableau. In this post we will learn How to use filters in Tableau.
Let’s starts with the General Filters
General Filters –
Let’s first create a Horizontal Bar chart to illustrate it. Drag and Drop Category to Rows then again drop sub-category to Rows. Then Drop Sales to Columns.
Now Let’s say we only want to show the data related to Furniture and Technology Category and exclude the Office Supplies.
To do that first drag and drop Category to Filters shelf. This will open a dialog box.
Uncheck Office supplies then click on Apply and ok.
The office supplies has been removed from the bar chart. Now, let’s say you want to do the opposite of it. You want to only show office supplies and exclude Furniture and Technology.
To do that click on category inside Filters shelf, there will be a drop-down menu. From the drop-down menu select Edit Filter. This will again open that dialog box. In the dialog box, simply check Exclude then apply and ok.
To reset all setting click on Category and from the drop down select clear filter.
Wildcard Filter –
Now let’s remove the category filter and drag and drop sub-category to filter shelf. Again the filter dialog box will open.
Now suppose I want to only view the sub-category that starts with C. To do that go to the Wildcard Tab. Then select starts with and in the Match Value type Uppercase C as it case sensitive.
Then Apply and ok.
Now, only Chairs and Copiers sub-category is show.
You can also choose other options like ends with, contains and exactly matches. Ends with will only select sub-categories that ends with the given string. Contains will select all the subcategory that contains that particular string and Exactly matches will select only subcategory that matches exactly what you have typed.
Condition Filter –
First reset all filters and bring the sub-category to the filter shelf. Now let’s say that you want to only show sub-category where the sum of the sales is greater than 100K and exclude all sub-category which has sales less than this.
To do that click on the drop-down menu and select Edit filter and then go to the Condition Tab. Then select by field. In the first field select sales and in the second drop-down select sum. You can also select AVG or other aggregation functions here. And in the third drop-down select greater than sign.
Click on apply and ok.
Now, we have only sub-category whose sum of sales in greater than 100k.
Top Filter –
Some times you may want to see Top 5 or 10 of something like Top 10 selling products or want to find out which is the top 5 sub-category by sales.
Let’s find out the later. So bring the filter dialog box and go to the Top tab.
To see that Bottom 5 just change the option from the Drop-down.