Interactive filters will allow our viewers to explore the data and engage with the visualization. We added one for Category to our map, but it currently only filters the map. We also want to use the map itself as a filter and to format the titles of our worksheets.
Learning Objectives
- Use a worksheet as a filter.
- Apply a worksheet filter to an entire dashboard.
- Add filters to context to fix filter ordering issues.
- Hide or change worksheet titles on a dashboard.
In Tableau, it is possible to turn a whole worksheet into a filter for a dashboard. If we make Map a filter, then clicking on a country will filter the data to only display mods from that country. This way our map will not only provide information, but also serve as a filter at the same time.
Start by clicking on the Map tile if it is not already selected. At the top left (or possibly right, depending on your arrangement of tiles), there will be a small list of options starting with an X and ending with a downward arrow. Just above the arrow is a funnel icon. Hovering over it produces the text: Use as Filter. Clicking on this will turn the map into a filter.
If you hover over the downward arrow below the funnel icon you will see the text: More Options. Clicking on this arrow will open up a dropdown menu where one of the options is Use as Filter. This does the same thing as clicking the funnel icon.
While we were able to turn the map into a filter, this did not connect the Category filter to the rest of the dashboard. We will have to do that ourselves.
We should probably test the filters we added to make sure they are working as they are supposed to.
How did this happen? This issue is caused by having multiple filters that are not being applied in the order we would prefer. Leave the dashboard and go to the Top Tags worksheet and look at the Filters shelf. We added the Tag filter when we made the worksheet, but the other two filters are new - one for the Category filter and one from the map.
This is what is currently happening: The top tag filter is applied, and the twenty tags are sorted in decreasing order. Then the country and category filters are applied. This changes the size of the various bars and may even eliminate one entirely. Because the top twenty have already been filtered and sorted, the remaining tags are left in their original order.
We want to pick the top twenty and sort the tags after applying the category and country filters. To do this, we will need to add both of these new filters to context.
We have fixed Top Tags, but we still have an issue. Clicking on the Category filter reveals that the second option (just below (All)) is Null. This is particularly distressing after all the work we did to add a null category filter and only display relevant values in the filter.
To illustrate why we do need to fix this, try selecting Null. While their stats are displayed in the bar chart and scatter plots, the map goes completely blank. Leaving Null available to our viewers does not seem like a good option.
Fortunately, we can fix this issue the same way we fixed Top Tags.
Before we call our dashboard done, we should probably format a couple of the worksheet titles. Endorsements and Approval Ratio are useful and informative, but Map is rather pointless, and Top Tags could stand to be more informative.
We are now ready to move on to the finishing steps of the tutorial.