Tableau How to: Show Only Relevant Values Filter

by Jessica Palmer

This blog shall outline how to only show the values that in one filter that correspond to a value selected in another filter. This ensures that the user can only select values that are applicable to the first value selected.

In the example data there are three filters for Year, Category and Speaker to generate a list  of 3 recommended talks for the user to watch based on these filters. However, the categories change year on year and the speakers change depending on the category. This can result in a long list of values some of which may not apply to the year ( this will impact the category and speaker category) or category (this will impact the speaker filter) selected.  This not only looks messy on the dashboard but can lead to confusion if the user clicks on a category or speaker that wasn’t there for the chosen year as the view would just be blank.

In this Image the Year 2019 has been selected and the Category Filter has many values that the user could select not all of which are apply to 2019

To fix this on the dropdown menu in both the Category and Speak filter switch the option from “All Values in Data base” to “Only Relevant Values”. Now when 2019 is selected the list of categories is shorter only showing the categories that took place in 2019 and only the speakers that spoke in 2019, if no category is selected.  When the category is selected the speakers list shall only show the speakers that apply to the category selected and that spoke in 2019.

The above image shows where to select 'Only Relevant Values' in the filter option menu
Now when 'Only Relevant Values' have been applied to the filter a shorter list of values in the category filter is shown, compared to the first image, when 2019 has been selected in the Year filter. 

These filters should be applied to context in the worksheet. Right click the filter in the filters card in the worksheet where the filters are applied and click on add to context.

This picture shows where to add context to a filter in a worksheet

There is a potential problem with using ‘Only Relevant Values’ that is important to remember. If it is set for all three filters, Year, Category, Speaker, then if  a category or speaker value has been selected then the year filter will only have one or two values that apply to the category or speaker value selected.   Therefore if I want to select different year to see who spoke that year or what categories are available   I would have to clear all filters or select all in category and speaker. This makes it slightly confusing and difficult at times for the end user when trying to navigate to a particular video selection. This is currently a problem for category and speaker filters, where selecting a speaker reduces category values shown and selecting a category reduces the speaker values show, but for the dashboard purpose it was not an issue.  Therefore, the ‘Only Relevant Values’ only works well when the filters are in a clear hierarchy in this example  Year → Category → Speaker.  The first filter in the hierarchy, in this case Year, should therefore ‘Keep All Values in the Database’.

If you want  to learn more about hierarchies in Tableau and how they work I recommend this article: https://help.tableau.com/current/pro/desktop/en-us/order_of_operations.htm

Avatar

Jessica Palmer

Wed 29 Dec 2021

Wed 22 Dec 2021

Fri 03 Dec 2021