Create a Line Chart in Tableau

A line chart, also known as a line graph, is a type of chart used to display data trends over time. It consists of a series of data points connected by a line, showing the relationship between two variables.

Here’s an example:

Suppose we want to show the monthly sales of a company over a year. The line chart would have:

  • X-axis (horizontal): Months (Jan, Feb, Mar, …, Dec)
  • Y-axis (vertical): Sales (in thousands of rupees)
  • Data points: Sales figures for each month, connected by a line

Let us see an example to create a Line Chart in Tableau:

Since we have already loaded the sample data as shown in the Get Data lesson. Now, click Sheet 1. Our table Orders is visible on the left:

1. Order Table in Tableau Sheet 1

1. Order Table in Tableau Sheet 1

Above, on the right, the charts and graphs we can make on Tableau are visible.

The Dimensions and Measures section on the left was previously visible before Tableau 2020.2. However, if you try to drag any of the fields, the same Dimensions and Measures text will be visible. The Dimensions section is at the top, and Measures is below it. 

We tried dragging on the of fields and the Dimensions and Measures words are visible i.e. pointing to the sections:

2. Dimensions and Measures for a table in Tableau

2. Dimensions and Measures for a table in Tableau

What are the dimensions and measures in Tableau

In Tableau, dimensions and measures are fundamental concepts for structuring and analyzing data. 

Dimensions

  • Qualitative Data: These fields are usually qualitative, meaning they describe data rather than measure it (e.g., categories, names, or dates).
  • Categories and Attributes: Examples include customer names, product categories, and geographic locations.
  • Segmentation: Used to slice and dice your data; for example, viewing sales by region or by product.

Measures

  • Quantitative Data: These fields are typically quantitative, meaning they contain numeric data that can be measured and aggregated (e.g., sums, averages).
  • Metrics and Values: Examples include sales revenue, profit, and number of units sold.
  • Analysis: Used to perform calculations and aggregations, such as total sales or average profit per product.

Now, that we understand the layout, therefore let us create a line chart.

Let us create a line chart:

For a line chart, we need Dimensions and Measures. We will drag one of the Dimensions i.e. Order Date to the Columns shelf on the top and one of the Measures i.e. Sum of Sales to the Rows shelf:

  • Columns Shelf: Order Date
  • Rows Shelf: Sum of Sales

It would automatically create a Line Chart on Sheet 1 from the right. Under the Show Me on the top-right, the charts you can create with your table are visible.

Just below the chart section, the suggestions to create a line chart are also visible i.e 0 or more Dimensions and 1 or more Measures:

3. Dragging fields to create a Line Chart in Tableau

3. Dragging fields to create a Line Chart in Tableau

We created a line chart displaying the sum of sales date-wise.

After clicking Sheet 1 below, we have renamed it Line Chart. The Line Chart text is also visible on the canvas as shown below:

4. Sheet renamed in Tableau as Line Chart

4. Sheet renamed in Tableau as Line Chart

Go to the File menu, and click Save. Save it as Amit_Tableau.twb. The path is also visible where our Tableau workbook is saved i.e. under the My Tableau Repository folder:

5. Save a sheet in Tableau as a Workbook

5. Save a sheet in Tableau as a Workbook

We have saved the Amit_Tableau.twb tableau file above. Within this, we have our 1st sheet as Line Chart:

6. Tableau file saved successfully as a Workbook

6. Tableau file saved successfully as a Workbook


If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

Connect Data Sources in Tableau
Create a Bar/ Column Chart in Tableau
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading