Callouts are a great way to draw your users’ gaze to a specific area of the visualisation which requires special attention.

I am going to use two different methods to create these callouts; 

  1. The first callout example is using a discrete measure and sits on the left-hand side of the visualisation, together with the other discrete fields.
    Image of a single level callout on a bar chart
  2. The second example also has the callout as a discrete measure but uses it as a label.
    1.  I will use this technique to call out 1 state, as well as 2.

Image of a multi-level callout on a bar chart

I will be showing how to call out 1 and 2 different states (Alert / Warning). Calling out too many points will lose the value of the callout, as it will be harder to discern what is important.

Using a single callout will mean that everyone, regardless of their colour sensing ability will be able to understand the callout. Having multiple different colours will require a substantial difference in hue and/or saturation to better accommodate people who have a vision deficiency. Alternatively, you could use different shapes.

1)  Create the base view.

In our example, I want to see Product Sub Category with line charts for Sales and Profit. 

Animated Gif showing the creation of the base sheet

Sub-Category on Rows, Sales & Profit on Columns, sort by Sales, colour Sales grey and Profit orange

2)  Add a Profit Ratio calculation

I will use this as our callout

Profit Ratio = SUM(Profit)/SUM(Sales)

3)  Add Profit Ratio to the viz

I want this in the viz initially to see where to put our breakpoints for the callouts

Image showing Sales, Profit and Profit ration pills in Columns and Sub-Category in Rows

4)  Create callout calculations

I am going to create two callouts: Callout < 8% and Callout <10% as examples of how a business can call out areas of concern at levels set by them.

Callout <8% = IF Profit Ratio < 0.08 THEN '●' ELSE '' END

The ‘●’ is a standard Unicode character. This and more examples can be found at https://www.compart.com/en/unicode/search?q=circle#characters

Callout <10% = IF Profit Ratio >= 0.08 AND Profit Ratio < 0.1 THEN '●' ELSE '' END

5)  Put together the first callout visualisation

This version will only accept one specific state to call out per Column as we are putting the colour on the font of the pill.

Animated Gif showing the creation of the first visualisation

Duplicate and rename sheet. Add Callout < 8% to rows, copy Sales & Profit to tooltip, move Profit Ratio to tooltip. Add Callout < 8% just after the Profit Ratio in the tooltip and Format to make the circle bigger and red.

6)  Additional calculations

To allow the tooltip for the callouts to be dynamic I need to create an additional calculated field, which shows the reason for the callout if there is one. As I will be doing a multi-level callout later, I will do both <8% and <10%

Header <8% = IF Profit Ratio < 0.08 THEN 'is less than 8%' ELSE '' END

Header <10% = IF Profit Ratio >= 0.08 AND Profit Ratio < 0.1 THEN 'is between 8 and 10%' ELSE '' END

8)  Create a transparent shape (if you don’t already have one)

Transparent shapes can be useful for many different purposes as can be seen in this post by Luke Stanke and this one by Kevin Flerlage

Creating a transparent shape is quite simple using your favourite image manipulation program, I use PowerPoint for most of mine as it’s free and can do a surprisingly large proportion of what I need. Open PowerPoint and create any shape you want. Change the fill colour to “No Fill” and outline colour to “No Outline”. Right-click on the image and “Save as Picture” and save it to the shapes folder in your Tableau Repository.

9)  Put together the second callout visualisation

This version will accept multiple states to call out as I am putting the colour on the font of the measure in the label section. I will be using MIN(0) to create a placeholder in the visualisation to hang a label from.

Animated Gif showing the creation of the second visualisation

Duplicate and rename Base Sheet. Put Profit Ratio on Tooltip for All cards. Create a pill MIN(0) and place it between Sales and Profit. Dual axis Sales and MIN(0) and synchronise axis. Untick show header on the MIN(0) axis. Set the Sales and Profit mark type to Bar and the MIN(0) to Shape, using a blank shape. Drag Callout <8% to Label on the MIN(0) card, change alignment to left in the label card, make the font bigger and shade red in the text box

10)  Tooltip and tidy

To finish off this viz I’ll do a few tidying steps and ensure the tooltips are informative (if not pretty).

Animated Gif showing how to make and format Tooltips

For the Sales and Profit cards, add Sales, Profit and Callout < 8% to the tooltip and organise & shade. For the Min(0) add Header <8% to the tooltip and organise & shade. Make the size of the Min(0) shape as small as possible.

11)  Multi-level callout

Finally, I’ll add a second level of callout in a different colour for a different breakpoint. I’ll colour these blue to get enough contrast to the red used for the lowest level of Profit Ratio to be able to tell the difference.

➥Duplicate the worksheet and rename. For the Sales and Profit cards, add Callout <10% to the tooltip, organise and shade. For the MIN(0) card add Header <10% to the tooltip and Callout <10% to the Label, organise and shade. Tick Allow labels to overlap other marks

 

And there you have it!

- Kurt

 

I have published the workbook on Tableau Public, so feel free to download it to have a look if there is anything which isn’t clear.

Thank you go to the ever-supportive Donna Coles for coming up with the solution.

Author
Kurt Nielsen

Kurt Nielsen

I help you get insights from your data. Easier. Faster.

Read more articles of this author
Let's discuss your data challenges

Join our community of data enthusiasts

Get industry insights, expert tips and Biztory news sent straight to your inbox with our monthly newsletter.