KNOWLEDGE BASE

How To Avoid Labels Overlapping Each Other While Showing All Labels In Line Chart Using Shapes


Published: 10 Apr 2020
Last Modified Date: 13 Apr 2020

Question

How to avoid overlapping labels while showing all the labels without moving them manually

For example:

User-added image

Expected:

User-added image

Environment

  • Tableau Desktop

Answer

1. Create following calculations

[Label1]
IF INDEX()%2=1 THEN ATTR([Category]) END

[Label2]
IF INDEX()%2=0 THEN ATTR([Category]) END

2. Drag calculation fields created above to [Label]

3. Click [Label] -> [Text] [...] to Edit Label as bellow

 <AGG(Label2)>
*Enter*
*Enter*
*Enter*
<AGG(Label1)>

User-added image

4. Click [Label] -> [Alignment] to adjust the position of labels to fit the view
 
Did this article resolve the issue?