For The Very First() Time

Jan 30, 2019

Klaus Schulte

At #TC18, right before #IronViz, I had a nice conversation with Zen Master Ann Jackson about table calculations in Tableau that can be summarized like this:

PowerPoint-Bildschirmpräsentation - [Präsentation1] 2019-01-30 11-14-12.jpg

I’ve remembered this conversation when I was working on this week’s #makeovermonday about the Digital Economy and Society Index in the European Union (click to play with the interactive version on Tableau Public):

Tableau - How do EU28-Countries compare to Estonia's Digital Economy and Society Index (DESI)? [from PUBLIC.TABLEAU.COM (DEFAUL… 2019-01-30 11-25-19.jpg

When I was working on this viz I had to admit to myself that LODs couldn’t do for me what I needed to execute my idea for this viz.

My Idea

I had the idea of a small multiple radar chart in a grid map and wanted to use the technique Ellen Blackburn described in her blogpost. For the European grid map I once more used the technique I described in one of my previous blogposts (“Get rid of the grid”).

While it is hard to compare the different radar charts over countries I had the idea to incorporate a reference radar chart which can be selected by using a parameter. With this reference radar chart I would be able to compare all five indicators at once and the regional pattern (notice how much more yellow there is in southern and south-eastern countries when using one of top countries like Denmark) would become even clearer.

Tableau - How do EU28-Countries compare to Estonia's Digital Economy and Society Index (DESI)? 2019-01-30 14-06-34.jpg

To be able to plot the reference radar chart I doubled the data (I eventually even tripled the data to bring in the reference rings in the third layer, but that’s not relevant for my main problem here) and brought in a field [Layer] to identify each copy of my data.

My x,y-coordinates were finally calculated like this (I calculated x & y in these formulas like Ellen described in her blogpost using relative scores):

Dialog 2019-01-30 12-51-34.jpg

For the radar charts:

Dialog 2019-01-30 12-54-52

For the circles on my second axis:

Dialog 2019-01-30 12-55-24.jpg

My Problem

So again: my idea for the second layer was to create a reference radar chart that can be selected by using a parameter.

My first impulse was to use a fixed-LOD:

Dialog 2019-01-30 13-18-06.jpg

But this lead me to the following values (I reduced the number of countries only for this example):

Tableau - How do EU28-Countries compare to Estonia's Digital Economy and Society Index (DESI)? 2019-01-30 13-30-12.jpg

Notice the values in the last column: my fixed-LOD is fixing the values for the selected country (Denmark) but is averaging the values for all other countries for each indicator. This is not what I needed. (If anybody knows a way to achieve this with LODs, please let me know!)

The Solution

So I had to try it with table calculations…

Dialog 2019-01-30 13-38-30

…resulting in these values (again look at the last column):

Tableau - How do EU28-Countries compare to Estonia's Digital Economy and Society Index (DESI)? 2019-01-30 13-41-17.jpg

How nice! This calc is showing exactly what it should show: the value of the first country for each indicator.

So I just had to bring my selected country to the top of this table by using this calculation for sorting.

Dialog 2019-01-30 13-46-07

Best thing: this sorting-calc can be incorporated directly into the table calculation (I have never used this feature before!):

Sorting 2019-01-30 13-48-05.jpg
Tableau - How do EU28-Countries compare to Estonia's Digital Economy and Society Index (DESI)? 2019-01-30 13-52-38.jpg

Now I have the values from the selected country for all countries and each indicator! That’s it!

Think I might start using table calculations more often.

Thanks Ann! 😸