#MakeoverMonday week 24 challenged the community to visualise data which compared the population of a country, with the number of tourists it attracts each year. Inevitably it revealed that for the selection of countries included, some are overwhelmed with inbound tourism, whereas others attract fewer visitors.

My visualisation was simple and separated the countries regarded as suffering from “overtourism” (more tourists than population) and “undertourism” (the opposite).

Dashboard 2

However, this short article has nothing to do with my submission! Instead it looks at some sneaky tricks employed by Andy Kriebel in his take on the data this week, which looked like this:

Screen Shot 2018-06-10 at 15.49.51

After downloading the workbook and taking a look “behind the scenes” to see how this was constructed, I praised Andy for his sneakiness on Twitter, but he was pretty underwhelmed by the feedback, insisting that he was just leveraging standard functionality.

Screen Shot 2018-06-10 at 16.14.22

He was, but it was still a nice example of using that feature-set to carve up the view. In this instance, the sneakiness is in the arrangement of the data in the view. How has Andy managed to get the countries in descending order by Rank in a single sheet, as shown above? Groups.

My initial assumption was that there would be some shenanigans involving INDEX() or one of the Rank table calculations, but they just aren’t needed because Rank was an existing Measure in the data. It is this field that Andy used as the basis for Row and Column Dimensions, which were formed using Groups.

If we start with Columns and consider that for each Category (“Overtourism” and “Undertourism”) we have ten Countries ranked, then you can pretty soon figure out that this lends itself well to a 2X5 grid. With that in mind, here is how the Column Group was constructed. Right-click on the Rank Measure to reveal the option to create a Group:

Screen Shot 2018-06-10 at 15.58.37

If you look at the image of Andy’s viz, you’ll see that the 2X5 grid means that the odd ranks run down one column, and the even numbers are adjacent. This is simply a case of creating a Group of odd numbers, and one of even numbers, which looks like this:

Screen Shot 2018-06-10 at 16.00.24

Referring once again to that image of the viz, we can see that the rows are formed by having Ranks 1 and 2 in the first row, 3 and 4 in the next, and so on. It isn’t rocket science, but it is fiendishly simple application of standard functionality. The Rows Group is constructed thus:

Screen Shot 2018-06-10 at 16.02.01

As soon as the Groups are created, Tableau stores them as Dimensions and you can start to build out the view. Not much happens initially, when no other Dimensions or Measures are used, but the 2X5 grid is shown:

Screen Shot 2018-06-10 at 16.03.38

Adding “Category” in does what you would expect – it basically forms the 2X5 grid twice, once for each Category:

Screen Shot 2018-06-10 at 16.04.51

When you put Country and Rank onto Text, the penny reaches its final destination:

Screen Shot 2018-06-10 at 16.06.55

This may be an eminently unsurprising article for many within the community, but small stuff like this always makes me smile. Beautiful simplicity. The final viz had a bit more polish to the formatting of the Label, which is along these lines (where the <Upper> calculation is just UPPER(Country) to convert the Proper formatted Country into uppercase only):

Screen Shot 2018-06-10 at 16.09.44

Tableau is full of great functionality which can be used in many ways. You can do fancy stuff with maps now that I can’t even begin to think about. You can break out your maths and create all manner of wonderful, mind-bending visualisations.

And you can leverage basic functionality to make your life easier. Groups are cool!