How to create a Bar chart in Power BI

Power BI is a powerful visualization application. In this blog, we will see how to create a bar chart in Power BI.

When to use a Bar chart in Power BI

Bar charts are used to compare values of unique data elements. Bars can be displayed vertically or horizontally. Bars can be stacked too. The size of the bar represents the value of the data element.

Download:

To recreate this example or to practice Power BI, download Power BI desktop.

Steps to create a bar chart in Power BI:

1. In this example, we will connect to OrderHeader.xls table. If you are not familiar with connecting and loading XLS files in Power BI, visit connect to excel data source in Power BI.  

2. On Power BI desktop, navigate to Report view, from Visualizations select the first chart i.e. Stacked bar chart.  This will create a placeholder for the chart on the canvas.

Selecting the visualization
Selecting Stacked bar chart visual

3. Select the placeholder of the chart on the canvas, select the fields (from the OrderHeader) that need to be displayed on the chart. For this example, we will use the following, Year and TotalDue. Year will be displayed under OrderDate -> Date Hierarchy. Power BI has automatically created a date hierarchy when OrderHeader table was loaded. 

4. Place the fields on the following sections, 

     – On Axis, place the Year.

    – On Values, place TotalDue

   – To provide different colors to the bars for each of the year, place Year on Legend too.

  1. Field placement for the chart
    Field placement for the chart

5. This will create a bar chart. Click on the roller pin icon to provide different formatting options.

Formatting options
Formatting options

I will use the formatting options, to change the fonts of Y-Axis and X-Axis. I will also make the Legend and title to appear in the center.

Bar chart after applying formatting
Bar Chart

  In case of any questions, please feel free to post your comments. 


About the Author

Chandraish Sinha has  20+ years of experience in Information Technology. He is an accomplished author and has published 11 books covering Business Intelligence related topics such as, Tableau,Power BI, and Qlik. Checkout his Amazon Author profile.

His latest book Excel Basics to Advanced covers all the aspects of MS Excel and provides exercises for self-learning.

Similarly, his recent book, Dashboarding with Tableau, covers all the features in Tableau and includes exercises for self-learning.

He has implemented IT solutions in different domains viz. Pharmaceutical, Healthcare, Telecom, Financial and Retail.

He blogs regularly on various IT topics. Check them out in the links given below: 

Blogs

Learn Tableau

Learn All Bi

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.