Tableau Line Chart – Analyse the trends of datasets

In this tutorial, we are going to learn about line charts in Tableau. Here, we will go through all the steps you need to know in order to create an informative tableau line chart for data analysis. Tableau offers a lot of interesting tools to create different kinds of line charts for every kind of business scenario. So first, let’s get started with the concept of line charts in tableau.

Stay updated with latest technology trends
Join DataFlair on Telegram!!

What are Line Charts?

A line chart is used to represent multiple data points connected together with a single line. These data points on a plot are called Markers. Line charts are used to analyze trends that datasets reveal. And for the same reason, line charts or lines in a plot are important in forecasting and trend analysis.

Before moving ahead, let’s see how to put your data into action using Tableau Motion Chart.

How to Create Line Charts in Tableau?

Follow the steps given below to create a tableau line chart. We are using a sample data set of Electronic store sales in Tableau Desktop. You can use your own data set to create a line chart with us.

Step 1: Add Dimension Field and Measure Field

To begin with, we will add a dimension field in the Columns section and a measure field in the Rows section. We add Order Date (dimension) and Sales (measures) fields from our dataset.add row and column in tableau line chart

This creates a preliminary line chart in the editing area. Now, we shall perform some more steps to create a dual line chart using two-measure variables.

Step 2: Add Profit Measure Field to Rows

In order to do this, we add another measure field; Profits to the Rows section. This instantly creates another line chart, just below the first one showing profit values for all the concerned years.add dimension in tableau line chart

Step 3: Drag SUM Measure Field to Y-Axis

Now that we have two different measure variables (Sales and Profit), we can treat them collectively as one measure. To do this, we drag our field SUM(Profit) to the y-axis of the chart.drag measure to line chart in tableau

Step 4: Find the Details of Measure Fields

After this, we will have a common y-axis for both Sales and Profit values. Also, in the Rows section, we do not have two separate measures, instead, there is one Measure Value that contains both the measure fields. We can find the details of it in the Measure Values card beneath the Marks card.

To make the two-line charts distinct from each other, we can put the field Measure Values into Color card. This shows the line for Profit as blue and for Sales as orange.yearly line chart in tableau

Step 5: Manage the Appearance of Tableau Line Chart

Now, we have two line charts sharing a common y and x-axis. We can also change the Order Date type from Year to Quarter, Month, Day, Week etc. We have changed it to Month.month dimension in tableau line chart

As you can see in the screenshot below, we have data points for each month in the respective year. Upon putting our cursor on the data points, we can see the details of the month, year and profit or sales value.monthly line chart in tableau

We can also make changes in the color scheme, line opacity, chart borders, line markers, halo, etc., to enhance our line chart in tableau. To add data labels on the tip of each data point in the line chart, we can drag and drop our measure field in the Label card present on Marks card.manage appearance of tableau line chart

We can also add forecasting lines which are extensions of the existing lines showing forecasted or probable values for future or coming years. We will learn about Forecasting in Tableau in a separate tutorial.


So here we conclude our tutorial on Tableau line chart. We hope it was easy for you to learn how to create line charts in Tableau on your device. If you have any queries or suggestions regarding the line chart in tableau article, mention them in the comments section. We will be happy to help.

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google | Facebook

1 Response

  1. raghu says:

    What are the advantages of line chart and dis advantages of the line chart
    and what is the use case of line chart

Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.