During my final challenge of dashboard week, I was tasked with working with Gender Pay Gap data from the UK and London, with information on quartile distribution. An interesting challenge I had was how to best visualise quartile distributions. Each employer/industry had a percentage of men and women in four pay quartiles (lower, lower middle, upper middle, and top). The obvious way to show this is with a set of stacked bar charts.
However, I wanted to measure how balanced those quartiles were. I thought on ways to create a single metric that scores how balanced and close an organisation or industry is to having a 50/50 gender split in each quartile.
Why measure balance?
Looking at a single quartile can be useful such as, if the top quartile is dominated by men it suggests a lack of women in senior, high-paid roles. But the quartile view only tells part of the story.
By building a “balance score” I could:
- Quickly rank employers or industries by how equal their quartile distributions are.
- Highlight organisations that are close to a 50/50 split.
- Spot outliers where one gender dominates across all pay bands.
Step 1: Reshape the data
The raw data I had was messy with row level information being unclear.
This is difficult to work with in Tableau, so the first step was to transpose the data in Alteryx so that it became tidy:
| Employer | Gender | Quartile | Percent |
|---|---|---|---|
| Company A | Male | Lower | 40 |
| Company A | Female | Lower | 60 |
| Company A | Male | Top | 70 |
| Company A | Female | Top | 30 |
Step 2: Create a balance calculation
In Tableau, I built a calculated field to measure how far away each quartile is from 50%:
ABS([Percent] - 50)
This gives me the deviation for each quartile. For example, if men are 70% of the top quartile, the deviation is 20.
Next, I summed these deviations across all four quartiles:
WINDOW_SUM(ABS([Percent] - 50))
A perfectly balanced organisation (50/50 in every quartile) would have a score of 0. The higher the score, the less balanced the distribution.
Step 3: Ranking organisations
Now with balance scores calculated, I could:
- Rank employers by their balance score.
- Create a bar chart showing the most balanced at the top and the least balanced at the bottom.
- Add filters to switch between employers or industries.
This quickly surfaced organisations/industries that are close to equality, as well as those that are skewed.
Why this approach is useful
Although I applied this to gender pay gap quartiles, the same technique could be used in other contexts where you want to measure how evenly something is distributed:
- Customer demographics (e.g. equal split across age groups)
- Survey results (e.g. balanced satisfaction ratings)
- Sales channels (e.g. even contribution from different regions)
By converting percentages into a simple balance score, you are able get a clear and comparable measure that can be used for ranking, monitoring progress, or building KPIs.
