Skip to content

Tableau Line Charts: The Ultimate Guide

Most people know that line charts are a great way analyze data.

Two reasons why this is true

  • Reason 1: People know how line charts work. They are easy to understand and are familiar to most people.
  • Reason 2: Line charts are great for showing how things change over time.

You’ve probably created line charts on paper or even in Excel. Along with bar charts, line charts are one of the most common chart types. 

Here’s the thing

Creating basic line charts in Tableau is very easy (as you’ll see below). Just dragging and dropping a few times. 

But, if you’re just getting started with Tableau you might not know about a few more advanced line chart types. 

There are few tips and tricks to create awesome Tableau line charts and this guide goes through everything you need. 

Basic Line Chart

#back to top

  1. Drag a Dimension field to the Columns section
  2. Drag a Measure field to the Rows section

In my example, I’m using the MONTH(Order Date) and SUM(Sales) from the Superstore Sample Data set that comes with Tableau.

[/et_pb_text]

[et_pb_text admin_label=”Basic Line Chart GIF” _builder_version=”3.27.4″] https://imgur.com/VWoLpeR [/et_pb_text]

[/et_pb_column][/et_pb_row][et_pb_row _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”]

[et_pb_text admin_label=”Line Charts with Multiple Measures” _builder_version=”3.27.4″]

Line Charts with Multiple Measures

#back to top

  1. Drag a Dimension to the Columns card
  2. Drag Measure Names to the Filters card and choose your Measures
  3. Drag Measure Values to the Rows card
  4. Drag Measure Names to the Colors section of the Marks card

For this example, I’ve chosen to show Profit, Quantity, and Sales for each month going back a few years. [/et_pb_text]

[et_pb_text admin_label=”Line Charts with Multiple Measures GIF” _builder_version=”3.27.4″] https://imgur.com/43vJU8H

Trend Lines and Forecasting

#back to top You can show trend lines and forecasts on your Tableau line chart by using the built-in tools. For instance, if you want to extend your data into the future past the data you have, then it’s just a few clicks to add that into Tableau and provide an early look at your data for your audience.

  1. Drag a Dimension to the Columns card
  2. Drag Measure Names to the Filters card and choose your Measures
  3. Drag Measure Values to the Rows card
  4. Drag Measure Names to the Colors section of the Marks card
  5. Click the Analytics tab of the Data pane
  6. In the Model menu, drag Trend Line to your chart and select a type
  7. Right-click on any Trend Line to view it’s details
  8. You can add a Forecast to the line chart in the same way and view it’s details.

[/et_pb_text]

[et_pb_text admin_label=”Trend Lines and Forecasting GIF” _builder_version=”3.27.4″]

https://imgur.com/CD9DARr

Line Chart and Bar Chart Combined

#back to top

Combining a line chart with a bar chart in Tableau is a good way to show two related metrics together. For example, this view is great to show monthly averages along side of weekly data points. Keep in mind, it’s especially useful for an Executive Dashboard that shows a lot of data in a small amount of screen space.

  1. Drag a Dimension to the Columns card
  2. Drag Measure Names to the Filters card and choose your Measures
  3. Drag Measure Values to the Rows card
  4. Drag a different Measure field to the Rows section so they are side by side
  5. Adjust the chart types for each measure in the Marks card
    • The first measure should be a bar chart
    • The second measure is the line chart
  6. Click on the second measure and select Dual Axis from the drop-down menu
  7. Right click on the right axis section and Synchronize your axis.
  8. Finish formatting as needed

Reminder:

Be sure to label your charts and axis properly to avoid confusing your audience

https://imgur.com/Q84PXsm

Line Chart and Dot Plot Combined

#back to top

This is a great Tableau “hack” to highlight specific data points with a line chart. Of course, you can skip the highlight part of this and just show the dot plot and line chart combined.

  1. Drag a Dimension to the Columns card
  2. Drag Measure Names to the Filters card and choose your Measures
  3. Drag Measure Values to the Rows card
  4. Drag a different Measure field to the Rows section so they are side by side
  5. Adjust the chart types for each measure in the Marks card
    • The first measure should be a dot chart
    • The second measure is the line chart
  6. Click on the second measure and select Dual Axis from the drop-down menu
  7. Right click on the right axis section and Synchronize your axis.
  8. Finish formatting as needed

To highlight specific data points like in my example below

  1. Create a calculated field called Position
  2. Enter the code to show what data points should be highlighted
    IF FIRST() = 0 then "First"
    IF LAST() = 0 then "Last"
    ELSE "Other"
    END
    
  3. Finish formatting as needed
https://imgur.com/1axcdXO

Line Chart and Area Chart Combined

#back to top

This is a great way to add a small border to an area chart in Tableau to make it stand out in your next project.

  1. Drag a Dimension to the Columns card
  2. Drag Measure Names to the Filters card and choose your Measures
  3. Drag Measure Values to the Rows card
  4. Drag a different Measure field to the Rows section so they are side by side
  5. Adjust the chart types for each measure in the Marks card
    • The first measure should be a area chart
    • The second measure is the line chart
  6. Click on the second measure and select Dual Axis from the drop-down menu
  7. Right click on the right axis section and Synchronize your axis.
  8. Finish formatting as needed
https://imgur.com/rzP9Lsb

Tableau Dotted Line Chart

#back to top

Dotted lines are surprisingly difficult to get working in Tableau. There’s no “easy button” to get a dotted line in Tableau but you can use these step by step instructions to create one from scratch.

  1. Drag a Dimension to the Pages card
  2. Drag the same Dimension to the Columns card.
  3. Drag a Measure to the Rows card
  4. Set the Mark type to Circle
  5. In the Pages controller card, configure the view:
    • Show history for all marks
    • Length = All
    • Show = Trails or Both
    • Format = Dotted line
    • Finish formatting as needed
https://imgur.com/5eNvgjb

Formatting Tips & Tricks

#back to top

Basic line chart formatting in Tableau is pretty easy. You can set the Colors, Size, and Line Styles using the Marks card.

But here are a few more useful formatting tips and tricks that I’ve used in past Tableau projects.

  1. Create any type of line chart in Tableau using one of the methods above
  2. Drag measure values to the Size section of the Marks card
  3. Set the Labels section of the Marks card to show labels on the side of each line
  4. Adjust the Axis as needed so the labels fit on the screen
  5. Right-click any point to add an Annotation to your line chart to draw attention.

Remember, the annotations can be formatted as well

  • Adjust the background and border colors
  • Adjust the shape from a hard corner to round corner
  • Adjust the line style from solid to dotted
https://imgur.com/FowAx0X

Conclusion

#back to top

In this guide, you learned everything you need to create line charts in Tableau.

  1. How to create simple line charts in Tableau
  2. The quickest way to create line charts using multiple measures
  3. All about line chart forecasting and trends
  4. How to make your Tableau line charts look awesome
  5. Combining bar charts with line charts
  6. Adding dots to your line charts with highlighting
  7. Creating a combo chart for area and line charts
  8. The easiest way to create a dotted line chart in Tableau

Okay, now it’s your turn

Leave a Reply

Your email address will not be published. Required fields are marked *