The Tableau Dual Lines Chart is very useful to visually compare the trend of multiple measures. In this article, we will show you, How to create a Dual Lines Chart in Tableau with an example.
For this, we are going to use the Data Source we created in our previous article. Please visit Data Labels in Tableau Reports article to understand the Data Source.
Dual Lines Chart in Tableau Example
In order to create a Tableau Dual lines Chart First, Drag and Drop the Sales Amount from Measures Region to Rows Shelf. Because it is a Measure value, Sales Amount is aggregated to default Sum. Once you drag them, Bar Chart will be generated as we shown below.
Next, Drag and Drop Order Date from Dimensions Region to Columns Shelf. Once you drag the Order Date, Line Chart will be generated as we shown below.
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 present in 2014, 2015, 2016, 2017, and 2018
Create Dual Lines Chart in Tableau 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 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 will be aggregated to default Sum. Once you drag them, another Line Chart will be generated for Total product cost as we shown below.
Let me change this to Dual Lines chart. To do so, Please expand the Show Me window and select the Dual Lines Chart from it
Once you select the Dual Lines from Show Me window, Dual Lines Chart will be displayed as shown in below screenshot. 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 in Tableau
To add data labels to 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 Forcast to Dual Lines Chart in Tableau
Drag and drop the Forecast from the Analytics tab to Dual Lines chart.
Now you can see the forecast as well.
Thank You for Visiting Our Blog