Last Friday, Craig tasked us with making over the viz we submitted for the shortlisting to enter the Data School AU 2.0 cohort.

Having already experimented with sets and parameters already, I wanted to revamp my viz (focused on the number of incoming travellers into Australia through flights – from where and when?) by making producing a viz that allowed for increased user selections, flexible exploration, and richer analysis. Given that I was working with a larger number of categories, this was a perfect opportunity to use a set action (released on Tableau 2018.3).

Using a selection vs other/conditional aggregation set action allowed my user to select, explore and compare any amount of countries and compare to a grouped unselected “Other.” Any time an additional country is selected, it is removed from the “Other” category and will be coloured with a distinct colour across the different graphs and charts. Clicking out of the selection will clear the countries in the set and return to the default navy blue.

Step by step guide on making a ‘Selection vs other’ Set Action:

  1. Create a new set on the Country dimension and name it ‘Country Set’ with no members selected in the set.

  2. Create a new calculated field named ‘Selected Countries’.

  3. Create a new calculated field ‘Colour’ and convert the measure from continuous to discrete.


By making the colour measure discrete, it will generate an individual colour from a palette. Note that a triangle should appear in the Colour pill in your marks card. This means it is a Quick calculated field. Right click on the Colour pill and Edit the Quick Calculation. Ensure that it is computed at the ‘Deepest level’.

  1. Create a new set action on the dashboard

  2. Drag a copy of the discrete ‘Colour’ field into colour into the marks card and a copy of ‘Selected Countries’ field into detail into the marks card for all target sheets.

 

From here, your dashboard set actions should be working and ready to go!

 

Pris Lam
Author: Pris Lam