Filter alternative

Overview

Instead of using Tableau’s standard filter to filter a dimension in a view, you can create a filter from a separate worksheet that displays the members of the dimension as a list.

In certain use cases I find this option to be far more powerful than using the standard filter. Specifically, this filter alternative:

  1. Allows a single click to filter one view and highlight another view
  2. Allows the target view to be filtered from clicks in multiple, different views
  3. Can be formatted in ways the standard filter can’t
  4. May be more intuitive for the user

I came up with this idea when I was wishing my filter would perform double duty in filtering one of the views while simultaneously identifying in another view the dimension that was being selected. (I’m certain I’m not the first to think of this idea, and it’s probably been implemented hundreds of times before. But, I go through it here because it helps me to go back through how I did it so I can more quickly do it again. I also think it’s helpful to people who are learning to see the creative process of others and perhaps pick up on some new techniques.)

The Problem

I had built a small multiples view and a “callout” view that would display a larger version of one of the small multiples. (I answer the why and the how of the small-multiples/callout combo in a previous post here, so I’ll skip ahead a few steps. The purpose of this post is to show the filter alternative.)

Each of the little charts is a country, and the callout displays a single, user-selected country.

With a dashboard action, clicking on the small multiple updates the callout. But what if I also want to add a filter for country so that the viewer could pick a country from a list?

Using the standard filter changes the Callout, but it doesn’t highlight the small multiples. Furthermore it “breaks” the title of the country. This is because the title for the Callout is a worksheet itself. The dashboard action from previously clicking on one of the small multiples is still acting on it, so by choosing a different country from the filter, the title is being filtered by the last country that was clicked on plus the standard filter. If the user has selected a different country from each, the title displays, “none.”

The Solution

Here’s how to build the Filter Alternative:

1) Create a new worksheet with the dimension on rows and text, then hide the header.

2A) Drag the sheet into your dashboard. I hid the title and then (2B) added a text object with directions for the sake of consistency.

3) Create two dashboard actions, one for the filter and one for the highlight:

Here it is in action:

The Benefits

We can see the four benefits at work:

  1. A single click in the Filter Alternative filters one view and highlights another view
  2. The target view is filtered by clicking in the Filter Alternative and in the Small Multiples view.
  3. The text has been enlarged in the Filter Alternative. (Go to its sheet and edit the text from the marks shelf. You could even change the font or color if you like.)
  4. Tooltips have been turned on for the Filter Alternative for the user to be able to see the low-lighted (unselected) text marks more easily.

5. (Bonus functionality: Multi-select) One word of caution (or another benefit depending on the use case): You can ctrl-click multiple countries from the Filter Alternative. This will filter for multiple members of the dimension. This could create some unexpected results. However, if desired, it works as a multi-select filter. Just make sure you give the user instructions for doing so.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: