How to Label Measure Values and Names in Tableau
A step-by-step guide to labelling measure values and names on the same chart.
If you'd like to create a chart like the one below, which includes labels for both the measure values (numbers next to the data points) and the measure names (Product 1, Product 2…) then you're in the right place!
In order to do this, you need to create a dual axis so that the data on the primary axis can be used to label the measure values while the secondary axis can be used to label the measure names.
If this sounds a bit confusing, don't worry! Just follow the steps below.
📊 Why include measure names directly on the chart?
It's all about reducing the brainpower needed to read your chart. When the measure names are labelled directly next to line or bar, there's no need to go back and forth between the legend key to check what data you're looking at.
Anything that makes your chart easier to read is worth doing!
Click here for the Tableau workbook
1Add a secondary axis
Let’s start with a chart which has no labels:
Drag Measure Values (or the measure itself if you’re only using one measure) to the Rows shelf, next to the existing Measure Values pill:
Make a dual axis:
Right click on the secondary axis on the right side and select Synchronize Axis. This is to make sure both the primary and secondary axes use the same scale:
Now you can hide the secondary axis header as it’s not needed:
2Add the measure values
Drag Measure Values on to the Label box under the Measure Values section.
This will add value labels to the chart:
Make the label colours match the line colour by selecting Label and then Match Mark Color:
3Label the measure names
Now drag Measure Names to the Label box under the secondary axis measure values, Measure Values (2). This will add the measure names on the chart:
Again, make the label colours match the line colour:
Format the label as you want - here I’ve made it bold and incraesed the size:
And there you have it, both measure names and measure values are now labelled on the same chart: