How to use Image Filters in Tableau
Tableau is a powerful tool for data analysis and visualization. Taking the extra time to make your viz intuitive and interactive can push your dashboard from run-of-the-mill to something that people enjoy using.
In this article, I’ll go through a brief tutorial on how to implement using images to filter your dashboard. The example is from a recent viz I created for #MakeOverMonday. If you haven’t heard about or participated in this, it’s a great community project where users submit some wonderfully creative vizzes all using the same dataset. I’ll share more details at the end of the post.
The data for this particular week was how often people wash their hands after using the restroom. A funny and (somewhat) less serious dataset that I decided to have some fun with and explore some techniques I typically don’t use in a more straightforward corporate dashboard. The dataset is as follows:
As you’ll see, this is a compact dataset of summarized figures. The primary way to “slice” and explore the dataset is the on the Location dimension. One standard technique is to add a dropdown filter to allow the user to interact with the viz and filter the results to include various locations. This approach is functional, works well, and has its place in many business-focused dashboards. An example filter for this dataset could look as follows:
But how can we spice things up with some image filters? Instead of using the standard drop-down, we can assign a custom image to each location dimension value so users can click on an image to filter data in the viz. Create a new sheet in Tableau and add the Location dimension to your rows and shapes. You’ll get something like this:
Tableau has good sets of shape objects out of the box that you could assign. However, in this example we want to use or own images. I found a few fun cartoonish images for this dataset to use. I created a new folder in My Tableau Repository -> Shapes directory on my PC and copied the image files to this new folder. The Tableau Desktop program uses this directory to read all the various Shape sets.
The next step is to assign this custom set of shapes to your dimensions. Once you click on the Shape mark and navigate to your newly created folder. Select and assign the appropriate image to each dimension value.
You’ll see that the shapes now show as your custom images instead of the default circles, squares, and triangles that appeared when you initially built the sheet. A bit of formatting, resizing, and removing default line separations and your sheet is looking ready for prime time on the dashboard.
The final step is to add this sheet to your dashboard and setup a Dashboard Filter Action. I have quite a few other sheets on this dashboard to get the functionality I wanted, but the filter action will essentially run an action on your Images and filter the other target sheets as needed.
Finally, put all the pieces together and the most important part…share your dashboard!
Hopefully this was informative and helpful to those looking to improve their Data Viz and Tableau skills. Post a comment, I’m happy to address any questions. A few other helpful links I promised:
#MakeOverMonday: A great community project that provides datasets that you can utilize to practice your visualization skills, share your work (use the #MakeOverMonday hashtag on LinkedIn and Twitter), and explore inspirational ideas on how others visualization the data.
Tableau Public: If you’re new to the Tableau Public community check out the site to download the desktop app and gallery of some fantastic data vizzes. This is a great place to go for inspiration and reverse-engineering creative ways to use Tableau.