Bar and Avg Line with a Twist.
2 min readFeb 13, 2025
In this tutorial, I will show you how to add Labels above the Bar and show Prior Sales with an Avg Line
There are 2 Parts in this.
- Labels above the Bar
- Adding Reference Line and Label
Labels above the Bar
- Connect to Superstore Data
- Create 2 Calculations.
Sales 2024
Sales 2023
Building the Visualization
- Drag Sales 2024 to Columns
- Drag Segment to Rows. Create an inline calculation AVG(0) and do a Dual Axis. Choose the second chart as Gantt and first as Bar.
- Drag Sales 2023 to Detail in first chart chosen as Bar chart.
- Drag Measure Names to Rows. Drag Segment and Sales 2024 to Label. Format the Labels.
- From Analytics Pane, Drag Average Line at Cell level.
- Choose the values for the parameters as shown below
7. Right click -> Format Reference Line. Reduce the Shading. Format the Label.
8. Choose the Alignment as Right and Middle. If it goes well, you should see the following
Thank you for reading. Connect with me on Twitter and LinkedIn, and check out my Tableau Public profile for more visualizations.