How to Add Average Line to the Bin Axis

Published: 24 Apr 2023
Last Modified Date: 26 Apr 2023


How to add average line to the bin axis?


  • Tableau Desktop


Average lines cannot be added to the bin axis, but can be added to the measure axes. As a workaround, you can add an average line by creating dual axis view with the field used for the bin.
User-added image

1. Add Continuous Profit(bin) to Columns.
2. Add CNTD(Order ID) to Rows.
3. Add SUM(Profit) to Columns.
4. Right-click SUM(Profit) and select Dimension.
5. Right-click Profit and select Dual Axis.
6. Right-click X axis and select Synchronize Axis.
7. Right-click the upper X axis and select Show Header.
8. Open Profit(bin) in Marks card and change the graph type to Bar.
9. Open Profit in Marks card. Click Color and change Opacity to 0%.
10. Open Analytics pane and drop the Average Line to the following target area.
 User-added image

Did this article resolve the issue?