#MakeoverMonday for 2017 kicks off with a look at the startling salary inequality in Australia. With relatively few exceptions, if you are female and employed in Australia, your male peers are almost certainly earning (often significantly) more than you.

I started looking at this on New Years Day, but having hosted a party that day, an accumulation of Prosecco and cheese soon brought an end to that ambitious plan. With a clearer mind this morning, I knew that I either wanted to depict this data with a barbell chart, or a gantt. Seeing as I’ve just taken in some information on the latter, that was the route I went down.

The start point is easy enough. I need Occupation on Rows, and I’ll start off with the Male salaries on Columns.


The [Male] calculation is simply:


To plot the “gap” between the gantt marks for the Male and Female salaries, I need another calculation, which is:


If I had plotted the Female salaries on the primary axis, I would have needed to reverse that calculation. To demonstrate that, If I switch the above round so it shows SUM([Male])-SUM([Female]), I get this:


This is because Male salaries are overwhelmingly higher in Australia and so to plot the “gap” correctly between the two salary points per occupation, I needed to plot a positive variance between them.

As you can see from the first image above, I planned on the “gap” being shown as a light grey, with the contrasting wages coloured in some sort of stereotypical way. I think there’s often too much overly sensitive tip-toeing in the world, and I don’t see too much of an issue with using variants of blue and red / pink to differentiate between genders.

For the second axis, I therefore need to make use of Measure Values so I can plot both the Male and Female salaries as gantt marks on either end of the “gap”:

Screen Shot 2017-01-02 at 16.13.59.png

To do this, I just dragged Measure Values to Columns. Once there, I right-clicked, selected Filter and unchecked everything barring the two fields I wanted to retain. I could then right-click the green pill on Columns and select “dual-axis”. After that, I removed “Gap” from the Size card on the secondary axis, and dragged Measure Names onto the Colour Card:


With dual-axis charts, it is best practise to synchronise your axes to ensure everything is aligned. Ordinarily, it’s just a case of right-clicking an axis and selecting the right option. Tricky when it’s greyed out….. Hmm. Not sure why this has happened, but looking at things, we seem aligned anyway so I’m not overly concerned. Maybe 10.1 included a stealthy “auto-synchronise” feature that I missed.

Next I wanted to use a basic parameter to switch between sorting occupations in descending order by salary – one option for Male and one for Female. It’s the standard combination of String / List in the parameter:


To make the Parameter function, it needs to be paired with a calculation, which again is simple:


With over 1,100 occupations in the dataset, I then elected to limit the returned data. In this instance, by an arbitrary number (35). That’s a two stage process. First you use a Top N filter:


And then you set the Sort Order:

Screen Shot 2017-01-02 at 16.26.51.png

Good. Everything is ticking along nicely. As a penultimate aesthetic tweak, I wanted to colour the “gap” just to reinforce just how imbalanced these salaries are. So where the Average Taxable Income is higher for Males, I want to colour the gap with a blue of some description, whereas the 80 or so instances where Females are better paid, would be shaded in Red:


It’s just a boolean Fixed on an Occupation by Occupation basis. With that dragged onto colour, the colours set to Red / Blue and opacity dropped to 25%, I get an effect that is satisfactory:


The blue gantt marker reflects the average Male Salary, the red marker represents the Female average salary. The bar linking the two reinforces where the Male / Female salary is higher. So the 4th and 8th occupations above have a higher average Female salary, with the others dominated by apparent wage inequality in favour of men.

This is all going to plan. The final main aesthetic switch prior to the dashboard stage, is to break away from a formal y-axis and to plot Occupation Labels alongside each Row instead. To achieve this, it’s a case of not showing the Occupation Header, dragging Occupation to the Label card on the primary axis and aligning it left. Spot the unintentional “mistake”:


Hmm. Those axes don’t look synchronised, and they aren’t as I wasn’t able to do so when the dual-axis was first created. How do I resolve that? A quick Google for:

tableau dual-axis not synchronised

returned this page, from which I took the following:


So I wrapped my [Male] and [Female] calcs in INT(), but nothing changed – I still couldn’t sync that y-axis. I wrapped them in FLOAT(), and bingo. The “Synchronise Axis” option is no longer greyed out:


After this, a little bit of dashboard tidy-up ensued, before my submission was published. It was good to get the opportunity to immediately apply some recent learning, but equally a surprise to encounter an apparent Tableau bug which still persists almost six years after another user first raised it in January 2011.