How to Make a Line Graph in Power BI

Cody Schneider••8 min read

Tracking performance over time is fundamental to understanding any aspect of a business, from monthly sales revenue to daily website traffic. Line graphs are the perfect tool for this job, and Microsoft Power BI makes creating them easier than ever. This guide will walk you through exactly how to create a line graph in Power BI, complete with practical tips and customization options to help you tell a clear story with your data.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

When Should You Use a Line Graph?

Line graphs, also known as line charts, excel at one thing: showing a trend in a continuous dataset. You should use a line graph whenever you want to visualize how a metric changes over a specific period, such as days, weeks, months, quarters, or years. It’s the go-to choice for time-series data.

Common examples include:

  • Tracking monthly sales figures to spot seasonal trends.
  • Visualizing website sessions per day to measure the impact of a marketing campaign.
  • Monitoring customer support tickets opened per week to manage staffing levels.
  • Showing the change in a stock price over a year.

Conversely, avoid line graphs for comparing categorical data at a single point in time. For instance, if you want to compare total sales across five different product categories for last month, a bar chart would be a much clearer and more effective choice.

Getting Your Data Ready for a Line Graph

Before you jump into Power BI, a little data preparation goes a long way. A clean and well-structured dataset is the foundation of any great visualization. For a line graph, your data should ideally be organized with at least two essential columns:

  1. A Time-Series Column: This is your date or time field (e.g., Order Date, Sign-up Date, Day). Power BI will use this column for the horizontal X-axis.
  2. A Numeric Value Column: This is the metric you want to measure over time (e.g., Revenue, Number of Users, Pageviews). This will be used for the vertical Y-axis.

If you want to compare trends for different categories on the same graph, you’ll also need a third column:

  • A Category Column (Optional): This field splits your data into different groups (e.g., Product Category, Country, Traffic Source). Adding this will create multiple lines on your graph, one for each category.

For example, a simple sales dataset ready for a line graph might look like this:

OrderDate, SalesAmount, Region 2023-01-15, 2500, North 2023-01-22, 1800, South 2023-02-05, 3100, North 2023-02-11, 2200, West

Once your data is in a format like this (in an Excel spreadsheet, a database, or another source), you can easily connect it to Power BI Desktop and start building.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step-by-Step Guide: Creating a Line Graph in Power BI

With your data imported, creating the actual line graph takes just a few clicks. Follow these steps to build your first one.

Step 1: Open Power BI and Select the Line Chart Visual

In your Power BI Desktop report view, look at the Visualizations pane on the right-hand side. Find the icon that looks like a graph with a line connecting several data points. Hovering over it will display "Line chart."

Step 2: Add the Visual to Your Report Canvas

Click the Line chart icon. A blank visual template will appear on your report canvas. You can click and drag the corners to resize it or move it around your page.

Step 3: Drag Fields to Their Designated Areas

With the new visual selected, look at the bottom section of the Visualizations pane. You will see several fields like X-axis, Y-axis, Secondary y-axis, and Legend. Here is where you tell Power BI what data to plot.

  • Drag your date/time field from the Data pane (e.g., OrderDate) and drop it into the X-axis well.
  • Drag your numerical metric (e.g., SalesAmount) and drop it into the Y-axis well.

Instantly, you should see a line graph appear, showing the trend of your chosen metric over time!

Step 4: Add a Legend to Compare Categories (Optional)

If you want to compare trends across different categories, this is where the Legend field comes in handy. Drag a categorical field (like Region or Product Category from our examples) into the Legend well.

Power BI will automatically create a separate, color-coded line for each category in that field, along with a key so you can easily identify which line corresponds to which category.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 5: Use Power BI's Date Hierarchies

One of Power BI's most useful features is its automatic handling of dates. When you add a date field to the X-axis, Power BI creates a hierarchy: Year, Quarter, Month, and Day. In the top-right corner of your visual, you'll see small arrow icons. These allow you to:

  • Drill Down: Click the downward arrow to go to the next level in the hierarchy (from viewing data by Year to seeing it by Quarter, then Month).
  • Drill Up: Click the upward arrow to go back up a level.
  • Expand All: Click the double-downward-forked arrow to expand the entire hierarchy and show all levels on the axis (e.g., "Qtr 1 2023", "Qtr 2 2023").

This dynamic feature lets you and your report viewers explore the data at different levels of granularity without needing separate charts for each view.

Customizing Your Line Graph to Make it Clear and Insightful

A basic line graph is useful, but a well-formatted one is even better. Power BI offers extensive customization options to improve the clarity and visual appeal of your chart. To access these, select your visual and click the paintbrush icon ("Format your visual") in the Visualizations pane.

General Formatting

Under the "General" tab, you can adjust the Title, add Effects like background colors or borders, and ensure your visual has appropriate Alt text for accessibility.

Visual Formatting

This is where you'll fine-tune the look and feel of the chart itself:

  • X-axis and Y-axis: You can edit or remove the axis titles, change the font size and color of the labels, or even set a manual range for the Y-axis if Power BI's automatic scaling isn't suitable.
  • Lines: Here, you can change the color of each line, adjust its thickness (stroke width), and change the line style (solid, dashed, dotted).
  • Markers: By toggling this on, you can add a shape (like a dot, square, or diamond) to each data point on your line. This is especially helpful if your data points are infrequent, as it calls attention to each specific reading.
  • Data labels: Turn this feature on to display the exact numeric value above or below each data point on the line. This saves your audience from having to guess a value based on its position against the Y-axis. Use this judiciously, as it can clutter a chart with too many data points.

Adding Analytical Elements

To take your analysis a step further, select the magnifying glass icon ("Add further analysis to your visual") in the Visualizations pane.

  • Trend line: With one click, you can add a statistical trend line that shows the general direction your data is moving, smoothing out the minor fluctuations.
  • Forecast: A truly powerful feature, this allows you to project future values based on your historical data. You can set the forecast length (e.g., project the next 3 months), and Power BI will use built-in predictive modeling to show potential future trends, complete with a confidence interval.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Bonus Tip: Using the Line and Stacked Column Chart

Sometimes you need to visualize two different metrics that have vastly different scales - for example, showing Revenue (in millions of dollars) and Units Sold (in thousands) on the same graph.

A standard line graph would struggle with this, as one line would be almost flat at the bottom. The solution is the "Line and stacked column chart" or "Line and clustered column chart" visual. These allow you to use a Secondary Y-axis. You can put Revenue on the column Y-axis and Units sold on the line Y-axis. Power BI will create a separate scale on the right-hand side of the chart for the line, allowing you to clearly compare the trends of two very different metrics in a single, cohesive visual.

Final Thoughts

Creating a line graph in Power BI is a fundamental skill for anyone involved in data analysis. It’s an incredibly effective way to uncover trends, identify patterns, and communicate performance over time. By following the steps above and experimenting with formatting options, you can move beyond basic charts and create dynamic, insightful reports that drive better business decisions.

Mastering tools like Power BI is a valuable skill, but building every report from scratch can become a time-drain, especially when your sales and marketing data lives in a dozen different apps. At Graphed, we created a way to skip the manual setup. Instead of dragging and dropping fields, you can just ask in plain language for what you need - like, "Create a dashboard comparing our Shopify sales to our Google Ads spend for this quarter." We connect your data sources and instantly build live, interactive dashboards, giving you back hours to focus on strategy instead of report-building.

Related Articles