This is a Quick Tip on how to build a Dual Line Chart in Tableau, so less reading and more jumping in. We are going to spend 5 minutes or less building our Dual Line Chart in Tableau.
Note: As always never choose a data visualisation type and try to fit your data into it, instead, understand your data and choose the best visualization for your data consumers.
Data
Load the following data into Tableau Desktop / Public.
Country | Date | Sales |
United Kingdom | 1-Jan-2019 | 90 |
United Kingdom | 1-Feb-2019 | 110 |
United Kingdom | 1-Mar-2019 | 100 |
United Kingdom | 1-Apr-2019 | 130 |
United Kingdom | 1-May-2019 | 130 |
United Kingdom | 1-Jun-2019 | 150 |
Germany | 1-Jan-2019 | 80 |
Germany | 1-Feb-2019 | 70 |
Germany | 1-Mar-2019 | 110 |
Germany | 1-Apr-2019 | 140 |
Germany | 1-May-2019 | 120 |
Germany | 1-Jun-2019 | 110 |
Worksheet
To start building our dashboard:
- Change the Mark Type to Line.
- Drag Country onto Color.
- Drag Date onto Columns.
- Right-click on the object and select Exact Date.
- Drag Sales onto Rows Twice.
You should now see the following:
Now we will update our visualisation:
- Right-click on the second SUM(Sales) pill in Rows and select Dual-Axis.
- Right-click on the axis header and choose Synchronize Axis.
- Double click on the Axis header to open Edit Axis and untick Include zero.
- Click on the second SUM(Sales) and change the Mark Type to Circle.
Now we can add some formatting and end up with something like the following:
and boom, you are done. You can also choose to use the Shape Mark type for fun. However, we are done and you can find my Dual Line Chart Dashboard on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/DualLineChartsinTableau/DualLineCharts
Summary
I hope you all enjoyed this article as much as I enjoyed writing it. Do let me know if you experienced any issues recreating this Visualisation, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic.
If you like our work, do consider supporting us on Patreon, and for supporting us, we will give you early access to tutorials, exclusive videos, as well as access to current and future courses on Udemy:
- Patreon: https://www.patreon.com/tableaumagic
Also, do be sure to check out our various courses:
- Creating Bespoke Data Visualizations (Udemy)
- Introduction to Tableau (Online Instructor-Led)
- Advanced Calculations (Online Instructor-Led)
- Creating Bespoke Data Visualizations (Online Instructor-Led)