For The Very First() Time
Jan 30, 2019
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:
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):
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.
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.
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):
For the radar charts:
For the circles on my second axis:
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:
But this lead me to the following values (I reduced the number of countries only for this example):
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!)
So I had to try it with table calculations…
…resulting in these values (again look at the last column):
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.
Best thing: this sorting-calc can be incorporated directly into the table calculation (I have never used this feature before!):
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! 😸
COMMENTS