On the second day of the dashboard week our task was to find and scrape data from the internet about Melbourne Cup and present it in a Tableau Viz.

Getting the data

I downloaded data from a betting website, cleaned and organized it using regex in Alteryx. It took me a few hours to get the data in the format I needed. The workflow itself was not too complicated but finding the required data in the website’s source code was a time consuming task.

Visualizing the data

The data I got was not very insightful but I didn’t have time to look for further dataset to enrich it. I had to start working on the visualization and get the most out of it in the remaining time. I created a simple layout and a parameter to swap the charts on the dashboard.

Below you can see the final product. Click on the image to see how it works.

How to swap charts on a dashboard

In case you wonder how to swap charts on the dashboard using parameters, here is a short guide.

First you need to create a parameter with string data type. For available values select “List”.  The values can be the names of the charts you want to show and hide.

The second step is to create a calculated field which returns different values based on the selected parameter. In my case the parameter name was “Show Measure” and the calculation looked like this:

CASE [Show Measure]
WHEN ‘Prize Won’ Then ‘Prize Won’
WHEN ‘Average $’ Then ‘Average $’
WHEN ‘Horse Win%’ THEN ‘Horse Win%’
WHEN ‘Jockey Win%’ THEN ‘Jockey Win%’

The next step is to show the parameter control by right clicking on it and clicking in “Show Parameter Control” on each of the worksheets you want to show and hide. Go to each worksheet, select the parameter which represents that sheet and pull the above calculation’s pill on the filter. You will only see the value which is associated with the selected parameter. Tick it and click on OK. Now when you change the parameter, your worksheet should go blank. Repeat this process on each sheet.

Now go to your dashboard, create a container and pull in all of your worksheets so they are either next to each other or above each other. You will see the selected worksheet and only the title of the other ones, as they are blank. Click on the little down arrow on the right side of one of the sheet’s container, hover on Parameters and click on the parameter to show it. Now you can choose which chart to show. The last thing you need to do is to hide the title of all the sheets. That’s it.

What did I learn today?

It is not easy to find a good data set, scrape it down from a website with Alteryx, do the regex work, and create a meaningful visualization in just 7 hours. Especially when you don’t know anything about the topic, as I don’t know anything about horse races.

Laszlo Dobiasz
Author: Laszlo Dobiasz