How to create a bar chart with two lines in Tableau

A bar chart with two lines is perfect for visualizing different categories of data at the same time in order to identify trends over a period of time.

Let us then see how to build bar chart with two lines on Tableau. Our goal is to create a graph showing profit, sales and margin over a period of time.

Step 1. Create the chart

  1. Connect to the data source (in this case we are not using Sample Superstore).
  2. Drag Date to Columns. Click on it and select Week number – Week 5, 2015 .
  3. Drag Margin to Rows. You will get a line chart.
  4. Drag Profit on the y-axis. You’ll now get a two-line chart.
  5. Drag Sales to Rows. Right click on it and select Dual Axis to show all the lines in one quadrant.

 

  1. Click on the y-axis labeled Sales on the right and select Synchronize axis.
  2. You might have noticed that you have different Marks card. Click on the one called SUM (Sales) and select Bar from the dropdown menu. Click on Color to edit the colors if you want and adjust the size.

 

 

  1. Move Measure Values in Rows after the SUM (Sales) tab.
  2. Click on the Measure Values Marks card and adjust the size of the lines. Done!

 

Don’t wait! Contact us to learn more and continue to follow upcoming news on our website and LinkedIn channel.