Line Graph in Tableau

Last Updated : 8 Sep, 2025

A line graph, also known as a line chart is a type of chart used to display values over a continuous period of time. It consists of two main axes:

  • A horizontal x-axis representing time or categories
  • A vertical y-axis representing the values being measured.

Line graphs are particularly useful for:

  • Tracking trends over time.
  • Comparing multiple variables.
  • Observing patterns such as growth, decline or seasonality.

Creating a Basic Line Graph in Tableau

A company can plot the number of sales made each month to analyze whether their product demand is increasing or decreasing over time in Tableau. To create a line graph in Tableau, we need to:

  1. Open Tableau and connect a dataset.
  2. Drag and drop a sheet from the dataset.
  3. Open a worksheet (for example, Sheet1).
  4. Select at least two attributes: one for the rows and one for the columns.
  5. From the chart options, choose Line as the chart type.

For this example, we will use the Region field for columns and Sales for rows to visualize how sales vary across different regions.

Customizing Line Graphs by Region and Sales

To analyze sales by region and subcategory, we can customize a line graph in Tableau by:

  1. Place the Region field on the Columns shelf and the Sales field on the Rows shelf.
  2. Change the chart type to Line Graph.
  3. Drag the Sub-Category field into the Marks section.
  4. Assign different colors to subcategories for better distinction.

This customization helps in analyzing how sales differ across subcategories within each region.

Adding Subcategory and Market Comparison

To compare categories, subcategories and markets, we enhance a line graph in Tableau by:

  1. Place Category and Subcategory on the Columns shelf.
  2. Place SUM(Sales) on the Rows shelf.
  3. Set the chart type to Line Graph.
  4. Drag the Market field into the Color option in the Marks section.
  5. Change the marker type to Dots on Lines for better visibility.

This graph allows users to compare categories and subcategories across different markets.

Visualizing Discounts and Profit in Line Graphs

To study the effect of discounts on sales and profit, we can add these fields to a line graph in Tableau by:

  1. Place Region and Category on the Columns shelf.
  2. Place Sales on the Rows shelf.
  3. Set the chart type to Line Graph.
  4. Drag the Discount field into the Color option.
  5. Drag the Profit field into the Label option.

This visualization helps in analyzing how discounts influence sales and profit across categories and regions.

Comment
Article Tags:

Explore