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. It would be nice to apply the category filter to all the visualizations on our dashboard, and to use the map itself as a filter. We will also do a little bit of formatting to deal with the titles of our worksheets.
In Tableau, it is possible to turn a whole worksheet into a filter for a dashboard. For example, 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 to make sure you have it selected. At the top on one of the sides 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, which is what we are looking for. 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. If you have already clicked on the funnel icon, your dropdown menu will show a checkmark in front of this option.
You can try out the filter to see how clicking on various countries changes the rest of the dashboard. If you want to include mods from several countries, you can hold command (control for Windows) while clicking each country you want. When you are finished filtering, you can click any open spot on the Map worksheet to dismiss your selection(s).
You can turn any worksheet into a filter - this method will also work with the bar chart and scatter plots we created. I would recommend waiting until you have finished the tutorial until you try it, however, just in case.
While we were able to turn the map into a filter, this did not connect the Category filter to the rest of the dashboard. That is, if I select a category, the view on the map will change, but none of the other worksheets will be affected. We will have to change the filter behavior ourselves.
Working with filters can be somewhat complicated. At the moment there is an issue with the filters on our dashboard, though it may be difficult to notice if you don't know exactly what to look for.
What's going on? If only a few mods met my filter requirements, I might be inclined to say that there were only nineteen tags to pick from. However, the country and category I chose should leave me with enough mods that this potential explanation feels incorrect. In fact, what is happening is simply a result of the order we are applying each of our filters.
There are currently three filters being applied to the top tags bar chart. First, the filter we set when we created the bar chart is applied. This narrows our list of tags to the top twenty. From that list, we then apply the country and category filters. Thus, while the top twenty tags for our subset of mods may include different tags from the initial top twenty, only those initial twenty tags are considered. Instead, we want to apply the country and category filters before we limit our bar chart to twenty tags.
It is possible to adjust the order we apply filters to our data, but not from the dashboard. We need to go back to the Top Tags worksheet by clicking on the tab at the bottom of the application. Of the three filters on the Filters shelf, we want to add Action(Country) and Category to context. Adding a filter to context is a fancy way of telling Tableau to apply that filter first.
We have fixed Top Tags, but this has caused us a new 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 mod data is still 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.