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.

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.

Turning a Worksheet into a Filter

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.

Funnel icon to use Map as 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.

Dropdown to use Map as filter

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.

Applying a Worksheet Filter to a Dashboard

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.

  1. Click on the Category filter and note the list of options on the top left or top right. This will be shorter than the map's list: Only an X and an arrow.
  2. click on the arrow for More Options.
  3. Choose Apply to Worksheets -> Selected Worksheets. This will allow us to decide which worksheets we will apply the filter to. Note that Only This Worksheet was the previous selection. Applying Category filter to worksheets
  4. In the window that pops up, click the button for All on dashboard. It will automatically check the boxes for each of the worksheets listed. We could check each box manually, but this option is more convenient. Apply Filter dialog box - applying Category filter to all on dashboard
  5. Click OK.
  6. Select a category from the dropdown menu and see how it filters everything on the dashboard now, not just the map.

Filter Issues

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.

  1. Pick a category from the Category filter. I chose Models and Textures.
  2. Click on a country on the map. I clicked on the USA.
  3. Top Tags is behaving strangely. With the filters I chose there are only nineteen tags displayed. Testing category and map filters

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.

Fixing Filters for Top 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.

  1. Make sure you are on the Top Tags worksheet.
  2. Right click on the Category filter on the Filters shelf.
  3. Choose Add to Context. The filter will change from teal to gray. Add category filter to context
  4. Do the same thing for the Action(Country) filter. The Filters shelf should show Action(Country) and Category as grayed out. The final filter, Tag should still be teal, as it has not been added to context. Top Tags filters
  5. Go back to the dashboard. Top Tags should now show twenty sorted tags. Fixed category and map filters

Fixing the Category Filter

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.

Category filter with Null option

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.

Blank map with null category

Fortunately, we can fix this issue the same way we fixed Top Tags.

  1. Leave the dashboard and go to the Map worksheet. One of the filters on the Filters shelf is already grayed out - the one we added to context from the bar chart worksheet.
  2. Right click on Category(null filter) and choose Add to Context. Category(null filter) added to context
  3. Go back to the dashboard and verify that Null is no longer an option.

Formatting Titles

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.

  1. Right click on the Map title and choose Hide Title. Hiding Map title
  2. Right click on the Top Tags title, but this time choose Edit Title.... Currently it is using the worksheet title as the title for the dashboard, but we can have it display any text we want.
  3. Change the text to: Top Tags by Number of Mods. Editing Top Tags title
  4. Click OK.

We are now ready to move on to the finishing steps of the tutorial.