Clicky

How To Add an Average Line To a Bar Chart in Power BI

how-to Jan 30, 2024
How To Add an Average Line To a Bar Chart in Power BI
Profile Image
Hi, I'm Tom Blessing. I'm an expert at helping small to mid-sized companies adopt Power BI. I'm also a recovering investment banker, with deep experience applying technology to otherwise manual data problems. I have dual degrees in Finance and Technology Management from Indiana University.

Resources to help build your fundamentals: Learning Power BI? Data fundamentals are critical for this process to be easier. I've assembled a few DataCamp courses to help. I earn a small commission if you click and purchase.

Introduction to Power BI course: Master Power BI basics and learn to build impactful reports.

Exploratory Data Analysis in Power BI course: Learn about Power BI's Exploratory Data Analysis (EDA) and enhance your reports.

Introduction to SQL course: Learn how to create and query relational databases using SQL in just two hours.

Introduction to DAX course: Learn the fundamentals of Data Analysis Expressions (DAX) such as calculated columns, tables, and measures.

Database Design course: Learn to design databases in SQL to process, store, and organize data in a more efficient way.


Bar charts are a popular choice for displaying data comparisons, and sometimes, it's valuable to add an average line to provide additional context to your audience.

In this blog post, I'll explore how to add an average line to a bar chart in Power BI, allowing you to better convey your data's central tendency and improve the overall understanding of your visualizations.

Why Add an Average Line to Your Bar Chart?

The average line in a bar chart serves several important purposes:

  1. Visual Reference: It provides a visual reference point that helps viewers quickly gauge where the data points stand in relation to the average.

  2. Central Tendency: The average line helps convey the central tendency of the data, providing insights into whether values are above or below the average.

  3. Highlighting Deviations: It allows you to identify data points that significantly deviate from the average, making outliers or anomalies more apparent.

Now, let's dive into the step-by-step process of adding an average line to your Power BI bar chart.

Step 1: Create or Select a Clustered Column Chart. The method I'm walking through below only works on this type of visualization. 

Step 2: Add Fields to the Chart

  • Drag and drop the category field (e.g., product names, months, or regions) into the "X-Axis" section.
  • Place the numerical value field (e.g., sales, revenue, or quantity) into the "Y-axis" section. 

Step 3: Add the Average Line

  • Once your visualization is created, click on it, and go to the 'Analyses' Icon in the Visualizations Pane.
  • Expand 'Average Line'.  
  • Click 'Add Line'. 
  • Customize further options as desired. 

Step 4: Review and Save

  • Review your bar chart to ensure that the average line is displayed correctly.
  • Don't forget to save your Power BI report.

Conclusion:

That's it! Using the built in functionality that's already in Power BI saves you from having to mess with DAX or use workarounds for basic tasks. Adding an average line to your Power BI bar chart is a powerful technique for enhancing data visualization and providing valuable insights to your audience. By following the steps outlined in this guide, you can effectively communicate the central tendency of your data and highlight any deviations, ultimately improving the clarity and impact of your reports and dashboards. 

Read more:
Troubleshooting Power BI KPIs Showing Blank
Multi-Row Card and Changing Units in Power BI
Removing a Power Query Connection: Overcoming Mistakes In Your Data Model
Power BI Map Not Working: Common Issues and Solutions
Here's How To Actually Merge Tables In Power BI

Download My Free Guidebook

The 3-Step Plan for Getting Started With PowerBI

Learn the best way I've helped large and small companies adopt the best analytics tool you've ever seen. In this FREE guide, I'll show you my complete startup strategy for Power BI.

We hate SPAM. We will never sell your information, for any reason.