How to add ‘context’ labels to a chart in Tableau

A neat little trick you may have seen in a recent visualisation of mine was to label the top line with more detail than the subsequent lines, allowing your users to gather more context without seeing more clutter.

2016-11-30_19-24-07.png

The trick is extremely simple and can be done in about 10 seconds.


1. Create your chart

2. Create a calculated field containing an IF statement that makes use of the FIRST() function.

IF FIRST() = 0 then “label” end

Calculation.png

3. Add this extra detail to the tooltip shelf and form the tooltip string as appropriate.

LabelOutput.png

And voila you have your context labels (it is important to note that you may have to change the computed along method given your scenario).

Ben

Context Labels.png

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s