The Tableau Dual Lines Chart is useful to compare the trend of multiple measures visually. In this article, we will show you how to create a Dual Lines Chart in Tableau with an example.
For this Tableau Dual Lines Chart demo, we are going to use the Data Source we created in our previous article. Please visit Data Labels in Tableau Reports article in Tableau to understand the Data Source.
Dual Lines Chart in Tableau Example
To create the Tableau Dual lines Chart First, Drag and Drop the Sales Amount from Measures Region to Rows Shelf. Because it is a Measure value, the Sales Amount aggregated to default Sum. Once you drag them, Bar Chart will generate.
Next, Drag and Drop Order Date from Dimensions Region to Columns Shelf. Once you drag the Order Date, Line Chart will generate.
Let me change the Order date value from Year to All months present in each year to see the detailed monthly information (trend line)
Now you can see the detailed Line chart for each month in 2014, 2015, 2016, 2017, and 2018
Create a Dual Lines Chart Approach 1
There are multiple ways to create a Dual Lines chart in Tableau. Drag and Drop the Total product Cost from Measures Region to a right-side axis
This will automatically create a Dual Lines chart for you
Create a Dual Lines Chart in Tableau Approach 2
Let me undo the above step. Next, Drag and Drop the Total product Cost from Measures Region to Rows Shelf. Since it is a Measure value, Total product Sale aggregated to default Sum. Once you drag them, another Line Chart will be generated for Total product cost, as we showed below.
Let me change this to the Dual Lines chart. To do so, Please expand the Show Me window and select the Dual Lines Chart from it
Once you choose the Dual Lines from Show Me window, the Dual Lines Chart will be displayed. Though it looks good from the below screenshot, you can observe that the Maximum Axis values of Sales Amount are 1500K, whereas Total Product Cost is 1000K.
If you have no problem, Leave as it is otherwise, Please select the Total Product Cost and select the Synchronize Axis.. option from the context menu
Now you can see the Dual Lines Chart with Synchronized Axis. You can also remove one axis
Add Data labels to Dual Lines Chart
To add data labels to the Dual Lines chart, Please click on the Show Mark Labels button in the Toolbar. Though it looks odd, you get the idea of adding data labels.
Add Forecast to Dual Lines Chart in Tableau
Drag and drop the Forecast from the Analytics tab to the Dual Lines chart.
Now you can see the forecast as well.