Tips and Tricks – Filter Types
I’ve been a bit busy lately and haven’t had a chance to update my Senate Tutorial or write any other articles, but I wanted to make a quick post about filters. The other day at work, a group of coworkers asked how they could best use filters for a dashboard they were building.
Their primary concern was with the number of items within certain dimension and how they could allow them to narrow down their choices through other filters as well as allow for users to type in items they were searching for.
Let’s start with the Sample store data set that comes with Tableau and build a simple visual showing Sales by Order month for a single year with Product Category on the color shelf.
Now that we have our visual built, let’s go ahead and right click (or click and drag if you prefer) to add the Product Category dimension to the Filters shelf. Let’s add Product Sub-Category and Product Name to the Filters shelf as well.
Once you add those dimensions to the Filter shelf, your filters should look similar to the image below.
Now we can explore some of the different filter types and filter options. Right click on the Product Category filter section to bring up the filter menu. You can also click the small downward facing arrow on the top right of the filter to view the menu. Once you open this up you will see quite a few filter types.
- Single Value (list)
- Single Value (dropdown)
- Single Value (slider)
- Multiple Values (list)
- Multiple Values (dropdown)
- Multiple Values (custom list)
- Wildcard Match
I won’t go into detail about each type, but basically, your Single Value filters allow the user to select only one value at a time (though you can have an All value that shows all), while the Multiple Values filters allow the user to select as many or as few items as they want from the filter list. For space saving, the dropdown types generally take up the least amount of room.
For this example, I used a Single Value (list) for Product Category, Multiple Values (list) for Product Sub-Category, and Multiple Values (dropdown) for Product Name. The Multiple Values (dropdown) filter allows users to type something in after clicking the drop down arrow and it will filter the options in the list to match what was typed). Your visual should now look like the image below (I moved the filters around to fit them in and put them in the correct order).
In order to get the Product Category filter to only show Product Sub-Category items that exist for the select Product, and for the Product Names to only show those items that exist for the select Product Sub-Category, we need to change the default filter option of “All Values in Database” to “Only Relevant Value”. This will automatically update the filter options when other filters are selected.
That about does it and should give you a better insight into some of the filter options available in Tableau. You can view and download the sample workbook I built for this using the link below.