Add A Label to Any Chosen Mark in Tableau

by Michael McFadden

When creating a scale with multiple marks sometimes I want a bit more flexibility on which ones have a label, and I learnt a great tip last week for doing just this.

I’ve created a chart which shows survey data for a respondent and a national average. I have the respondent in a circle, and I have the national average as a gant line but I only want to show the respondent value as a label, within the circle.

 

Start by taking the measure which represents the value and placing it on detail.

 

Now right click on your axis and select ‘Add reference line’. If this is greyed out, it’s likely because it’s set to discrete. In order to make the option available change your axis to continuous.

 

Set up your reference line to show the value you wish to use as your label, by pane, and don’t show a line like so:

 

Click okay and you should have something like this

 

Now right click on the invisible reference line to the left of the number and select ‘format…’

  • Format the alignment so it’s central to make it appear in the centre of your circle mark.
  • Make the opacity on shading 0% to remove the box around your label (unless you want this, but I feel it looks much clearer without).
  • Format the text to preference.

 

And we end up with the desired outcome

 

This technique can be repeated for as mark marks as you need labels on without the restriction of the labels card, and allows the freedom to pick and choose without built in logic or parameters.

 

To learn how to create this chart type you can use this blog post which gives a step by step guide.