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!
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.
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.
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.