A neat #Tableau parameter technique for multiple dimensions and a bug in version 8.1

Introduction

I use Tableau for scheduling basketball games and reporting tournament results.  One of the difficulties I have faced in these applications arises because team schedules and results are stored in multiple dimensions.  This means that a team can be either a home team or a visiting team in the database, which are two different fields (i.e., Tableau dimensions) in my database.  If you use two quick filters to choose your team based on these two dimensions, they are mutually exclusive, so you don’t get what you want.  In other words, you will only get a subset of the team schedule or results, or you have to make two separate filter selections to get the home team information first, followed by the visiting information. This is not a good approach to use so I had to create a solution.


If you like this article and would like to see more of what I write, please subscribe to my blog by taking 5 seconds to enter your email address below. It is free and it motivates me to continue writing, so thanks!

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


The Goal is to Print a Schedule

I would like for a parent to be able to print a schedule for the team of their child as shown in Figure 1.

Schedule_Print

Figure 1 – Print a schedule by picking your coach. The coach is listed as both a home and visiting team, so the parameter has to be able to select games from both dimensions.

Parents should be able to pick a coach name or a team name from a list and their schedule will appear.  It shouldn’t matter if the team is a home team or visiting team.  So I devised a method to accomplish this task and it involves a little logic being applied in a calculated field.  The parameter usage is shown in Figure 2 and explained in the video at the end of the post.

Parameter_mutiple_dimensions

Figure 2 – How to create a calculated field that uses a parameter and some logic to display results for a coach in both the home team and visiting team fields (click to download Tableau Public File).

The Tableau 8.1 Bug

In publishing this work with Tableau 8.1 to Tableau Public, I encountered an interesting bug where the final two rows of any tables being created are dropped. The application works perfectly in Tableau Public and on my local machine, but when the Tableau-generated script is embedded in my website, the problem arises.  This bug is also shown in the video below.  I have had to remove the embedded viz from from my website and have replaced it with a link to my Tableau Public workbook.  At this time, I have no knowledge of why this happens because I have embedded Tableau workbooks in the past without this type of issue occurring, so I presume this is a Tableau 8.1 issue. I have not tested this in a previous version of Tableau to verify that this is an 8.1 issue, however.

One thought on “A neat #Tableau parameter technique for multiple dimensions and a bug in version 8.1

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.