Hi, my name is Bruna Guglielmi, and I’m from Sydney Cohort 26 🙂

Last week’s challenge (3rd week of Data School) was all about Tableau – table calculations, and LODs.

In the morning, our coaches proposed that we choose a WorkOutWednesday focused on these topics. After completing the challenge, our presentation would be a demo, so we had 6 minutes to present as we built our dashboard from scratch.

It was a super fun exercise because we had to show our logic while building the dashboard, and the feedback everyone received was amazing—it was more than valuable.

 

The Process:

I chose the WOW 2024 W33, which was supposed to focus on table calculations. My task was to replicate this Olympic medals table in the best way possible, but since my coach and I didn’t like the result of the WOW, we decided to focus on getting a cleaner result with a better UX experience.

 

Step 1: Data Preparation

(Tableas from the data set file)

I got the dataset, which had so many Excel tables, so I opened them all and checked the information I wanted. Since it was a medal table with only the medal totals and events, I just used medals.csv and medal-totals.csv.

(relationship building between the tables on tableau)

I created a relationship in Tableau between these tables to avoid duplicated values, as relationships are the safest method to combine two tables. Plus, I cleaned the total medals by pivoting all the “Gold, Silver, Bronze, and Totals” into one column with these titles and another column with the values. This way, I would have a longer, skinnier table since this is how Tableau prefers to read its data. (dimnormalized data)

(total medals table before pivoting the values)

 

Step 2: Building the Basic Structure

I built the table to see how it would look and created a calculated field with the country flags and the images of the medals. It was awesome because I had no idea I could change the data type of a string into a URL, and this would turn into an image haha.

(Table structure)

 

Step 3: Actually Building the Scope of the Visualization

 

(Drill down visual – hole information I wanted )

It was so challenging to put everything together in 4 hours because I was super lost in how to build the whole thing. I wanted to have the index of countries sorted by the number of gold medals, not the total medals. So, I did a calculation to filter the total medals and return just the number of gold ones, so I could use that to sort my country codes and have the index based on that.

Another thing I learned was that if I have the same field twice in my Rows or Columns to achieve two different things and I hide one of them, it will hide both. So, if you need the same field twice, just duplicate them so they have different names. Then you can hide one and show the other.

I feel much more comfortable using parameters instead of sets, so I was trying to do a drill down using sets, but in the end, I couldn’t get the exact result I wanted. Every time, I had to sacrifice something in my viz to achieve one result or another.

 

I wanted to have the index on the left of the country flags, and on the right, just the gold, silver, bronze, and total medals. I also wanted the actions to be: if you click on a country flag, it would open a list of sports that the country that won any medals, and the medals would update their values and break down the total number into the number of medals they won in each sport.

After that, I wanted a second drill down so that after selecting the sport, it would give me the events where they won medals, and again update the number of medals with more detail.

 

Challenges and Learnings:

 

What happened was, that when I used the index to get the number of countries with the most medals, I couldn’t use the total number of medals, and vice versa. So, I chose to just leave the grand total and keep my index number.

In the end, I learned so much about table calculation locks (with specific dimensions). Every time I drilled down into the level of detail of my view, my index calculation was recalculating all the numbers, and it was super painful to understand why that was happening. It turned out it was just because my calculation was fixed in “table down” instead of the specific dimensions I wanted Tableau to use to calculate my index number.

 

(Table result using lock-in specific dimensions instead of only selecting table down)

(Table down calculation – not locked in specific dimensions – would calculate the index to USA many times instead of keeping the n.1)

It was also challenging to understand the level of detail of both tables. I was using the table with total medals, and it wasn’t on the same level of detail as the medals table that had all the events where each medal was acquired for each country. So, I had to work around and use both numbers to get what I wanted when I was building the table. (Will make a video showing the demo of this dashboard building because this is a bit hard to explain in writing)

I also learned a lot about parameter actions and how to relate two drill-downs properly using calculated fields.

 

I’m still struggling with sets because I set a goal for myself to replicate the same actions and interactions I did with parameters using sets, but it’s still really complicated haha.

I posted the dashboard on my Tableau Public, so if you’re curious to see a bit of the process and all the crazy calculations I did to try some things, feel free to download the workbook and explore the logic behind everything.

Thanks again, and I hope to share more with you all soon 🙂

 

The Data School
Author: The Data School