Power BI: How to Add Average Line to Chart

Often you may want to add an average line to a bar chart in Power BI that displays the average value for all bars shown in the chart, such as the following:

Fortunately this is easy to do by using the Average line feature within the Analytics tab for the Clustered column chart visualization in Power BI.

The following step-by-step example shows how to use this feature in practice.

Step 1: Load the Dataset

First, we will load the following dataset into Power BI that contains information about the total sales made by various stores:

Step 2: Insert the Clustered Column 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 Clustered column chart icon:

An empty clustered column chart will be inserted.

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

This will produce the following chart:

The x-axis displays the store and the y-axis displays the sales for each store.

Step 3: Add the Average Line

To add a line that represents the average sales value for all of the bars in the chart, click the magnifying glass icon under the Visualizations tab, then click the dropdown arrow next to Average line, then click + Add line:

Power BI add average line to chart

An average line will be added to the chart.

Next, click the dropdown arrow next to Line to customize the appearance of the average line and then click the dropdown arrow next to Data label if you would like to add a numerical label to the line.

For our particular example, we chose to add a black dashed average line with a data label that shows the average value of the bars to be 40.33:

Power BI average line

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

Leave a Reply

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