Jazzing up your Tooltips in Tableau using Calculated Fields

by Ben Davis

Until recently I didn’t pay much attention to my tooltips in Tableau.

I almost treated them as annoying defaults that I’d have to strip back, or ignore altogether.

Now I’ve realized their great potential as a beautiful complement to the data. If used well, they can be a valuable guide for both data exploration and data communication phases.

Tooltips can perform the role of narrator to guide the reader through the data in the absence of a human presenter.

Central to this is the use of Calculated Fields to get the tooltips to say exactly what you want to say, not what already exists in your data. To effectively communicate our data, we often need to decode jargon and curiously named categories into plain English. If designing for non-specialist audiences/users, I try to form my tooltips into real sentences that my grandma could probably understand.

Here is an example from a recent piece of client work for the NHS:

This heatmap is a correlation matrix to help explain disease across the UK. Each cell represents the Correlation Co-efficient between a disease prevalence (column headers) and a socio-demographic variable (row headers). Each cell is coloured to represent the association between pairs of variables. The greater the colour saturation, the stronger the association, while blue = positive correlation and red = negative correlation.

This is how the original tooltip appeared:


Based on this it would be difficult for the user to extract much meaning from this. What does the Explanatroy Variable mean? What does the Corr Coeficient mean? Is it saying areas with older people have more or less Heart Failure???

This desperately needed to be cleaned up into an intelligible sentence.

Here’s how I created the new improved tooltip:


STEP 1: The two sentences in the tooltip summon information from 4 different fields (the highlighted and colored elements). Three of these are Calculated Fields. The only field that would make some sort of sense to a broader audience is the disease names.

Firstly I translated some quite abstruse sounding Socio-demographic explanatory metrics into human terms, using IF THEN statements, then swapped this new field for the Explanatory Variable field in the tooltips.  Dragging a field from data pane to the ‘Tooltip’ marks card will bring it the Tooltip editing window.


STEP 2: Rather than leave it to chance that people would understand what the Correlation Coefficient meant, I thought I’d lay this out clearly.

Positive values = positive correlations (i.e. an increase in the explanatory variable results in an increase in the response variable); negative values = negative correlations.

With the help of the IF THEN statement below I have laid this out in the tooltip in similar terms.

As socio-demographic metric increases disease becomes more/less prevalent.

I have also emboldened/coloured the key words in the tooltip, that change from cell to cell of the heatmap.

Now it is much easier to interpret interesting looking cells in the heatmap, right?


STEP 3: As well as translate what the positive/negative aspect of the Correlation Coefficient meant, I thought I’d translate what the size of the number meant.

Once again I have relied upon IF THEN statements. This time to assign pre-defined categories of correlation strength to values that fall within certain ranges.


I have then used this new field in the second sentence of my tooltip, which reads:

The relationship is weak/medium/strong with a Correlation Coefficient of X.

I thought I’d leave the Correlation Coefficient in there, in case a more statistically trained user wanted to draw their own conclusions.


My next step would be to dynamically colour the ‘more/less’ in the tooltip to match up with divergent red/blue colour coding of the heatmap.

However, as of yet – I haven’t worked out how to do this. If anybody knows, please post in the comments below!



Table Calculations in Tableau: Calculate differences in a couple of clicks

2 mins read

Mon 08 Aug 2016

Mapping equitable sales territories in Alteryx - Part 3

5 mins read

Mon 01 Aug 2016

Mapping Big Data using Tableau + Alteryx…..(Part 2 – Heat Maps)

4 mins read

Thu 07 Jul 2016

Mapping Big Data using Tableau + Alteryx.....(Part 1 - Grid Maps)

6 mins read

Wed 06 Jul 2016