In this Power Bi tutorial, we will learn what is Microsoft Power Bi bar chart and how to create a Power Bi bar chart using the Power BI desktop.
Then we will discuss the below configurations, by using the sample data:
- Introduction to Microsoft Power BI bar chart
- How to create a Power bi bar chart using Power bi desktop
- Power bi bar chart width
- Power bi bar chart with total
- Power Bi bar chart show value and percentage
- Power Bi bar chart color based on the value
- Power Bi bar chart with multiple values
- Power Bi bar chart with target
- Power Bi bar chart group by month
- Power bi bar chart show zero value
Microsoft Power BI bar chart
The bar chart in Power Bi also called the horizontal chart is useful for the data comparison. Both the bar chart and the column chart in Power Bi are one of the most common to visualize the data.
Both the chart using rectangular bars where the size of the bars is proportional to data values.
There are three type of Microsoft Power BI bar chart these are:
- Stacked bar chart
- Clustered bar chart
- 100% stacked bar chart
Read: Power BI Pie Chart – Complete Tutorial
Create a Power bi bar chart using Power bi desktop
Here we will see how to create three types of power Bi Bar chart these are Stacked bar chart, Clustered bar chart, and 100% stacked bar chart.
If you are new to Power BI, check out an article on how to create a report in Power BI using the Power BI desktop.
For this demo, we will use an excel file to create a bar chart using the Power BI desktop, you can download the sample data from here.
- Open the Power Bi desktop
- Load the data from the Get data present in the Power Bi ribbon, then select Excel datasheet.
- Click on Load or Transform Data.
- Go to the Power bi report.
- First, we will create a Stacked bar chart.
- In the Field formatting, in Axis, add Product category from the filed section, and in values add Sales field.
- Now you can see the Power bi stacked bar chart.
- Now select the Clustered bar chart from the visualization.
- Select Axis -> Add Product category from field list, legend -> Add customer segmentation field, and values -> sales.
- Now we will see the Power bi clustered bar chart in the below screen shot
- Select 100% stacked bar chart from the visualization in Power bi.
- In the Field formatting, select Axis -> Product category, legend -> customer segmentation, and values<- sales.
- Now in the the below screen-shot you can see the Power bi 100% stacked bar chart.
This is how to create a power bi bar chart.
Read: Power BI waterfall chart
Power Bi bar chart show value and percentage
Here we will see how to show value and percentage in power bi bar chart(stacked bar chart) by using the above sample data.
- Open the blank Power Bi report on the power bi desktop.
- Select the stacked bar chart from the visualization.
- In the Field formatting, product category-> Axis, Customer segmentation-> legend, and sales-> value.
- In the field formatting, under value -> click on dropdown -> Show value as -> Percentage of grand total.
- Go to the Format section in the visualization pane.
- Turn on the Data label
- In the Data label, under position-> Inside end.
- Turn on the Show background in the data label.
Now you can see the Power Bi bar chart show value and percentage.
Power bi bar chart width
Here we will see how to set Power bi bar chart(Stacked bar chart) width using the above sample data in power bi.
- Open the blank Power Bi report on the power bi desktop.
- Select the stacked bar chart from the visualization.
- In the Fields section, customer segment-> Axis, and Sales -> value.
- Go to format section-> Y-axis.
- In the Y-axis, go to inner padding, by increasing and decreasing the inner padding, simultaneously we are increasing and decreasing the width of the bar chart.
Now you can see the Power bi bar chart width is 20%.
Power bi bar chart with total
Here we will see how to create Power bi bar chart(Stacked bar chart) with total by using the above sample data in the Power bi desktop.
- Open the blank report on the power bi desktop.
- Select Stacked bar chart from the visualization.
- In the Format section, order date(month)->Axis, and sales and profit-> values.
- Go to the Format section.
- Turn on the Data label.
- Then turn on the Total labels.
Now you can see the Power bi bar chart with total.
Power bi bar chart show 0 values
Here we will see how to show 0 values power bi bar chart using sample data. You can download the Sample Data from here.
- Open Power bi desktop, Click on the Get Data->Excel
- Then click on Transform data
- Select the heading of the column in the Query editor
- Click on Replace Values
- In the Replace values dialog box, under the Value to find-> null, and under Replace With->0
- Click on OK.
- In the Power bi report, click on clustered bar chart from the visualization.
- In the field section, add all the months in the X-axis(values) and add customer segment(Y-axis)->Axis.
- In the Format section, Turn on the data label.
Now you can see in the Power bi clustered bar chart show zero values.
Power Bi bar chart color based on the value
Here we will see how to add color based on the value on the Power Bi bar chart using the above sample data.
- Open your power bi desktop.
- In the power bi report, click on the Clustered bar chart from the visualization pane.
- Then add the Product sub-category->Axis and Sales-> value section.
- Go to the Format pane, turn on the data level.
- Then go to click on the data colors from the Format section in the visualization pane, click on the conditional formatting (fx) in the default color section.
- In the data colors dialog box, under the Format by choosing the Color Scale.
- Then under the Based on field, Select Sales from the options.
- Under Summarization select, Sum from the dropdown.
- Under minimum select a color for the lowest value and under maximum select a color for the highest value.
- If you want to add color to the middle value, then you can check the diverging and add colors to the middle value.
- Click on Ok
Now you can see the Power Bi bar chart color based on the value.
And also you can set the custom values from the data colors dialog page.
- To set the Power BI bar chart value based on the custom value
- In the Data colors Dialog page under Minimum, select custom from the drop-down.
- Then enter the custom value. Here I have entered 350000
- In the same way, custom the value for maximum.
- Click on OK.
Now you can see the Power Bi bar chart color based on the custom value.
Read: How to Embed Power BI Report in SharePoint Online
Power Bi bar chart with multiple values
Here we will see how to create power bi bar chart with multiple values using above sample data.
- Open the blank report on the Power Bi desktop.
- Select Stacked bar chart from the visualization in the Power Bi.
- Add Product sub-category-> Axis and Sales and profit-> value.
- Turn on the Data label from the Format pane
- Now you can see the stacked bar chart based on Sales and Profit by product Sub-category.
Power Bi bar chart with target
Here we will see how to create power bi bar chart with target by using the above sample data.
- Open the blank report in power bi desktop
- Select Stacked bar chart from the visualization pane.
- Now add fields to the Field format, Axis -> product Sub-category and value-> profit and unit price.
- Now we will set the targeted value based on the profit and unit price by product subcategory.
- Here we are setting the targeted value as 60K.
- Let’s see how to add targeted value to the Power Bi bar chart.
- In the visualization pane, go to the analytics section in the visualization pane.
- Expand the constant line. Click on the Add icon.
- Then give a name to the constant line like target or goal.
- Then enter the targeted value under the Value section.
- Then select the color for the constant line.
- You can change the position, transparency, and line style of the constant line in the bar chart visualization
- Scroll down to the bottom, turn on the data level.
- You can change the data label text, color, position for both horizontal and vertical display units and you can show the data levels in decimal.
Now yo can see the Power Bi bar chart with target based on profit and unit price by product sub-category.
Power Bi bar chart group by month
Here we will see how to create a grouped by month bar chart in Power Bi by using the sample data. You can download the sample data from this link.
Then Load data into the Power Bi by using Get data -> Excel.
- Select Stacked bar chart from the visualization in power bi report.
- Then in Axis->Date, value ->Sales, and in legend-> Year ( create a separate column for the year).
- Click on the fork icon to expand all down one level in the hierarchy(date).
- Now you can see the Stacked bar chart grouped by month based on Sales by year, month, and year.
You may like the following Power BI tutorials:
- Publish to Web Power BI Error: Contact Your Admin to Enable Embed Code Creation
- Power BI: How to Connect Most Recent File from a Folder
- How to display Power bi google analytics in PowerApps
- How to embed Power bi report in PowerApps portal
- How to change data source in Power BI
- Power BI MAX and MIN function with Examples
- Power BI DAX Logical functions
In this Power Bi tutorial we learned, what is Power Bi bar chart? And also we learned how to create a Power Bi bar chart.
Then we learned about:
- Power Bi bar chart show value and percentage
- Power Bi bar chart color based on the value
- Power Bi bar chart with multiple values
- Power Bi bar chart with target
- Power Bi bar chart group by month
- Power bi bar chart width
- Power bi bar chart with total
- Power bi bar chart show zero value
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.