Labels Over Bars - Two Different Techniques (Kevin & Kasia)
Before we get into this blog post, I want to give a big shoutout to Andy Kriebel. He is the first person I ever saw place the label above a bar chart. He also developed an absolutely brilliant technique for doing this, which you can accessed here. This blog post will build upon his work and provide an alternative method for placing labels above the bars and give a bit of flexibility for how close those labels are to the bars.
Also note that I had this blog post written and ready to go when I was approached by one of our regular contributors, Kasia GÄ…siewska-Holc, who stated that she had come up with an alternative way to place the labels on top of bars. So instead of this blog post just showing my technique, we will also show hers - two different, new techniques.
In some instances, placing a label out to the left of the bar (which is Tableau's default) simply does not work. Take this dashboard for example. The bar chart on the left appears okay, but the one on the right has extremely long header names, which reduce the size of the bars (the most important part of the chart). (Note: you can access this dashboard on Tableau Public.)

Here is a zoomed-in view of the chart on the right. See, the long header names make the chart much harder to read, and it doesn't look very good either.

So what do we do? Well, any time I have long header names like these, I place the label on top of the bar. Before reading about my technique, check out Andy Kriebels brilliant technique.
Start with the chart shown above which you can access via Tableau Public, then watch the video on how to build this.
Pretty simple, huh? And you can control how close the label appears to the bar!
But as mentioned, Kasia has come up with another way of doing this and I'm delighted to show her method as well. Although mine was in a video, her's is in written text below (thanks, Kasia!). Here is her workbook on Tableau Public.
In Kasia's words:
1. Create a value label placement calculation
Using Superstore data, create a calculation called Value Label Placement.
This will control spacing and ensure all value labels align to the right.
Formula: WINDOW_MAX(SUM([Sales])) * 1.2 (the multiplier controls value labels and bars spacing).
2. Add Sub-Categories
Drag Sub-Category to the Rows shelf.
3. Add values
Drag Measure Values to the Columns shelf.
Set the mark type to Bar.
In the Measure Names filter, select Sales and the Value Label Placement fields.
Right-click the Value Label Placement pill → Compute Using → Table (Down).

4. Create space for labels
Double-click in the Rows shelf and type MIN(1.0).
Set axis range: 0 to 2.5.
This axis controls spacing. Higher values increase the gap between bars.
5. Add color distinction
Drag Measure Names to the Color card.
Blue bar = actual value.
Orange bar = value label placeholder.
6. Add a new mark for category labels
Double-click in the Columns shelf → type MIN(0.0).
Right-click axis → set custom range 0 to 1.
This will later display the category label.

7. Configure value labels
On the Measure Values mark card:
Add SUM(Sales) to Label.
Align to bottom-right.
In Label settings, change from All to Min/Max.
Set Scope = Table, Field = Measure Names.
Uncheck Label Minimum Value → keeps only the maximum, so labels appear only once.

8. Configure category labels
On the MIN(0.0) mark:
Drag Sub-Category to Label.
Align to top-left.

9. Combine axes
Make the two columns (Measure Values & MIN(0.0)) a dual axis. Do not synchronize axes.
10. Create the “faux bars” with reference bands
Ctrl/Cmd + drag MIN(0.0) from Columns shelf to Detail on Measure Values.
Go to Analytics → Add Reference Line for Measure Values pill (per Cell).
Value: SUM(Sales)
Label & Tooltip: None
Line: None
Fill Below: Choose a bar color.
11. Mask the sub-category label space
Add another Reference Line for MIN(1.0) (per Cell).
Remove label & tooltip.
Line: None.
Fill Above: White (or match your dashboard background).

12. Final Touches
Hide headers for pills on Rows.
Reduce Measure Values mark size → makes them look like subtle accents at the end of bars.
Set orange mark color to transparent (see Kevin’s trick for transparent color).
Color Measure Values actual value marks by Category for more visual context.
Remove gridlines, zero lines and column dividers, keep light row dividers for readability.
Hide axes.
Sort Sub-Categories by Sales.
Clean up tooltips, titles, and legends.
Known Limitations
Bars are built from reference lines → hovering won’t trigger tooltips on the bars themselves (only on marks).
Light reference line shading may appear on hover. If you don’t need tooltips, place a blank object over the chart, leaving only the scrollbar visible.
Chart background won’t be transparent due to reference line fills. This may cause issues if your dashboard background isn’t a solid color.
This method takes a few extra steps but gives you a visually balanced chart that handles long labels gracefully. Perfect for when you want a clean, non-standard bar chart layout.
Kasia!
Both Kasia and I thank you for reading and hope you found it valuable!!!
───────────────────────
Need help with anything related to Tableau? Through Moxy Analytics, Ken and I provide consulting services such as Tableau Lifeline (get us for 1 hour to help solve a sticky problem), Fractional Data Hero (get us on your team for N number of hours a month for whatever you want us for), Tableau Training, and of course, project work. Click the Icon below if you are interested.











No comments: