How to Add Multiple Line Graphs in Tableau
Comparing trends over time is a fundamental task in data analysis, and the line graph is the perfect tool for the job. But what if you need to compare trends for multiple categories at once? This is where a multiple line graph in Tableau comes in handy. This tutorial will walk you through a few accessible methods to create and customize multiple line graphs for clear and impactful data storytelling.
Why Use a Multiple Line Graph?
Before jumping into the "how," let's quickly touch on the "why." A standard line graph is great for showing the trajectory of a single metric over time, like total monthly sales. But when you break that single line into multiple lines - one for each product category, for example - you unlock deeper insights.
A multiple line graph helps you to:
- Compare Performance: Easily see which category is performing best or worst at any given point in time.
- Identify Trends and Patterns: Spot seasonal trends or growth patterns specific to certain categories. For instance, you might see that sales for "Office Supplies" spike at the beginning of each quarter, while "Technology" sales are more erratic.
- Analyze Relationships: Observe if different categories move in tandem or if a rise in one corresponds with a fall in another.
Getting Your Data Ready
Effective line graphs in Tableau rely on a clean data structure. For a multiple line graph comparing categories, you’ll generally need three key fields in your dataset:
- A Time Dimension: A field containing date or time information (e.g., Order Date, Sign-up Date). This will form your X-axis.
- A Measure: A numeric value that you want to track over time (e.g., Sales, Revenue, Website Sessions). This will form your Y-axis.
- A Categorical Dimension: A field that splits your data into distinct groups (e.g., Product Category, Region, Marketing Channel). This field will be used to create the individual lines.
For our examples, we will refer to the "Sample - Superstore" dataset that comes with Tableau, which contains fields like Order Date, Sales, and Category.
Method 1: The Classic Drag-and-Drop Approach
This is the most common and straightforward way to build a multiple line chart in Tableau. It involves splitting a single line chart into multiples using the Marks card. Let's build a chart showing monthly sales for different product categories.
Step 1: Set Up the Time Axis
First, we need to place our time dimension on the view to establish the X-axis.
Action: Bring Your Date Field to the Columns Shelf
Find your date field in the Data pane (in our Superstore example, it’s Order Date) and drag it onto the Columns shelf. By default, Tableau will likely aggregate this by YEAR. You’ll see a blue pill that says YEAR(Order Date). This means the date is being treated as a discrete (separate) value.
Action: Adjust the Date Granularity
We want to see a continuous trend, not just data points for each year. To change this, right-click on the YEAR(Order Date) pill on the Columns shelf. In the dropdown menu, you'll see two sections for date parts and date values. Select one of the continuous date options from the second section — let's choose Month (the second one, which will look like "May 2015"). The pill will turn green, indicating it's now a continuous axis.
Step 2: Add Your Measure
Now that we have our time axis, we need to add the numeric value we want to track.
Action: Drag Your Measure to the Rows Shelf
Find your measure in the Data pane (we're using Sales) and drag it onto the Rows shelf. Just like that, you have a line graph! Right now, it shows the trend of total sales across all categories combined over time.
Step 3: Split the Line by Category
This is where the magic happens. We'll now tell Tableau to break that single "Total Sales" line into separate lines for each of our product categories.
Action: Drag Your Categorical Dimension to the Color Mark
Find the dimension you want to use to split the lines (in this case, Category) and drag it from the Data pane directly onto the Color tile within the Marks card. Tableau will instantly redraw the view. Now, instead of one line, you'll have three: one for "Furniture," one for "Office Supplies," and one for "Technology," each with its own color. A color legend will automatically appear to the right.
Congratulations! You've just created a multiple line graph.
Method 2: Using Measure Values and Measure Names
What if you don't want to analyze one measure "split by" a category? What if you want to compare different measures on the same timeline? For example, you might want to see how your Sales, Profit, and Order Quantity have trended together over the last year. For this task, we use Tableau's special generated fields: Measure Names and Measure Values.
Step 1: Create the Basic View
Start with a fresh sheet. Drag your time dimension (Order Date) onto the Columns shelf and set it to a continuous month, just like in the first method.
Step 2: Add Measure Values
Next, find the Measure Values field in the Data pane and drag it onto the Rows shelf. By default, this will create a chart that adds every measure in your dataset to the view, which is probably not what you want. Don't worry, we'll fix that next. You'll also notice a new card appear in the view called Measure Values, which contains pills for each measure being displayed.
Step 3: Filter Your Measures Using Measure Names
Now we need to tell Tableau which measures we actually want to plot.
Action: Remove Unwanted Measures
On the Measure Values card, you can simply drag the pills for the measures you don't want off the card. For example, drag away everything except for SUM(Sales), SUM(Profit), and SUM(Quantity).
Action (Alternative): Filter with Measure Names
A cleaner way is to use the Measure Names field. Drag Measure Names from the data pane to the Filters shelf. A dialog box will appear with a list of all measures. Uncheck "All" and then select only the ones you want to display: Sales, Profit, and Quantity. Click OK.
Step 4: Use Measure Names for Color
Currently, you probably see one single line that represents all three measures combined. To separate them, drag Measure Names from the Data pane onto the Color mark in the Marks card. Now, Tableau will draw a separate colored line for each measure you selected in your filter.
Method 3: Creating a Dual-Axis Chart
Sometimes, you want to compare two measures that have vastly different scales. Imagine trying to plot Sales (tens of thousands of dollars) and Quantity (hundreds of sold items) on the same Y-axis. The Quantity line would look almost flat at the bottom, making it impossible to read. The solution is a dual-axis chart, which gives you a separate Y-axis for each measure.
Step 1: Build the First Line Chart
Start by creating a simple line chart as usual. Drag Order Date (set to continuous month) to Columns and drag your first measure, like SUM(Sales), to Rows.
Step 2: Add the Second Measure
Now, drag your second measure, like SUM(Quantity), onto the Rows shelf and place it to the right of your first measure. You'll see two separate line charts stacked vertically, one above the other.
Step 3: Combine with Dual Axis
This is the key step. Right-click the pill for your second measure (SUM(Quantity)) on the Rows shelf and select Dual Axis from the menu. The two charts will merge into one, and you'll now see a Y-axis on the left for Sales and another one on the right for Quantity. Tableau might change the mark type for one line, you can adjust this easily in the Marks card.
Step 4: Synchronize Axes (Optional but Important)
If your two measures are on a similar scale or represent the same units (e.g., comparing Gross Revenue vs Net Revenue in dollars), it's a good practice to synchronize them. Right-click on the second Y-axis (the one on the right) and select Synchronize Axis. This ensures that a visual change in one line is directly proportional to the other.
Best Practices for Multiple Line Graphs
- Limit the Number of Lines: Don't overload a single chart. Plotting more than 4-5 lines can create a "spaghetti chart" that's impossible to read. If you have more categories, consider breaking the chart up or highlighting only the most important lines.
- Use Color Thoughtfully: Choose colors that are easy to distinguish. Use your brand palette, or use a gray color for context lines and a bright color for the line you want your audience to focus on.
- Add Clear Labels and Tooltips: A good legend is important, but you can also label the end of each line directly. Customize your tooltips to show the category, date, and exact value when a user hovers over a data point.
- Leverage Markers: On the Marks card, click Color and add markers ("dots") to your lines to emphasize specific data points, making the chart easier to follow.
Final Thoughts
Building multiple line graphs in Tableau is a fundamental design skill that moves your analysis beyond high-level totals into detailed, comparative insights. Whether you're splitting a single measure by a categorical dimension, comparing multiple measures, or using a dual axis to handle different scales, these methods allow you to tell a richer and more nuanced data story.
While mastering tools like Tableau is a powerful skill, the process of configuring visualizations and connecting data often involves a steep learning curve and hours of manual work. We built Graphed to bypass that complexity completely. Instead of dragging and dropping pills, you can just ask a question in plain English like, "Show me a line chart of sales compared to profit from Google Ads last month," and get a live, interactive dashboard in seconds. By connecting all your marketing and sales data in one place, we handle the setup so you can focus on exploring your data, not wrestling with BI software.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?