Power BI: How to Add Trend Line to Line Chart


A trend line is a type of line that summarizes the trend of a dataset.

The following step-by-step example shows how to create the following line chart with a trend line in Power BI:

Power BI add trend line to line chart

Let’s jump in!

Step 1: Load the Dataset

First, we will load the following dataset into Power BI that contains information about the total sales made during 15 consecutive years by some company:

Step 2: Insert the Line Chart

Next, click the Report View icon on the left hand side of the screen:

Then, on the right side of the screen under Visualizations, click the Line chart icon:

An empty line chart will be inserted:

Step 3: Populate the Chart

Next, drag the Year variable under the X-axis label, then drag the Sales variable under the Y-axis label:

This will produce the following line chart:

The x-axis displays the year and the y-axis displays the sales.

Step 4: Add a Trend Line

To add a trend line to summarize the sales over time, click the magnifying glass icon under the Visualizations tab, then toggle the Trend line to On:

The following trend line will be added to the line chart that summarizes the trend of sales over time:

Feel free to modify the color, transparency, and line style of the trend line to make it look however you would like.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

How to Create a Stacked Column Chart in Power BI
How to Plot Multiple Lines on Line Chart in Power BI
How to Calculate Percent of Total in Power BI

2 Replies to “Power BI: How to Add Trend Line to Line Chart”

    1. In the latest versions of Power BI, the process for adding a trend line to a line chart has been updated. The ‘Analytics’ pane, previously used for this purpose, has been replaced by the ‘Add further analysis to your visual’ section. To add a trend line to your line chart, follow these steps:

      1. **Create or select your line chart**: Ensure your chart is based on a dataset with a continuous numeric or date field on the X-axis.

      2. **Access the ‘Add further analysis to your visual’ section**:
      – With your chart selected, locate the magnifying glass icon with a chart inside it in the Visualizations pane.
      – Click on this icon to open the analysis options.

      3. **Enable the trend line**:
      – In the analysis options, find the ‘Trend line’ toggle.
      – Switch the toggle to ‘On’ to add the trend line to your chart.

      4. **Customize the trend line** (optional):
      – After enabling, you can adjust properties such as color, transparency, and line style to suit your preferences.

      **Important Considerations**:

      – **X-Axis Requirements**: The X-axis must be set to ‘Continuous’ and should represent a numeric or date field. If your X-axis is set to ‘Categorical’, the trend line option will not be available.

      – **Supported Visuals**: Trend lines can be added to the following chart types:
      – Line charts
      – Area charts
      – Clustered column charts
      – Line and clustered column charts
      – Scatter charts

      If you do not see the trend line option, ensure that your visual meets these criteria. For more detailed information, you can refer to Microsoft’s official documentation on using the Analytics pane in Power BI.

Leave a Reply

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