The Tableau Dual Lines Chart is useful for comparing 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 will 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 the Measures Region to the Rows Shelf. Because it is a Measure value, the Sales Amount is aggregated to the default Sum.
Once you drag them, Bar Chart will generate.
Next, Drag and Drop the Order Date from the 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 the 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 the Measures Region to the Rows Shelf. Since it is a Measure value, Total product Sale aggregated to the 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 the 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 the Sales Amount are 1500K, whereas Total Product Cost is 1000K.
If you have no problem, Leave it 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, 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.