Power Bi Bar Chart [Complete tutorial]

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.
stacked bar chart
stacked bar chart
  • Now you can see the Power bi stacked bar chart.
stacked bar chart in power bi
stacked bar chart in power bi
  • 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.
Power bi clustered bar chart
Power bi clustered bar chart
  • Now we will see the Power bi clustered bar chart in the below screen shot
clustered bar chart in Power bi
clustered bar chart in Power bi
  • 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.
100% stacked bar chart in Power bi
100% stacked bar chart in Power bi
  • Now in the the below screen-shot you can see the Power bi 100% stacked bar chart.
Power bi 100% stacked bar chart
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.
Power bi stacked bar chart
Power bi stacked bar chart
  • In the field formatting, under value -> click on dropdown -> Show value as -> Percentage of grand total.
show value as percentage in power bi
show value as percentage in power bi
  • 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.
data label in power bi
data label in power bi

Now you can see the Power Bi bar chart show value and percentage.

Power Bi bar chart show value and percentage
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.
Power bi stacked bar chart
Power bi stacked bar chart
  • 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.
inner padding in power bi
inner padding in power bi

Now you can see the Power bi bar chart width is 20%.

Power bi bar chart width is 20%
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.
Power bi stacked bar chart
Power bi stacked bar chart
  • Go to the Format section.
  • Turn on the Data label.
  • Then turn on the Total labels.
total data label on stacked bar chart
total data label on stacked bar chart

Now you can see the Power bi bar chart with total.

Power bi bar chart with total
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.
Replace value power bi
  • 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.
Clustered bar chart in power bi
Clustered bar chart in power bi
  • In the Format section, Turn on the data label.
power bi data label
power bi data label

Now you can see in the Power bi clustered bar chart show zero values.

Power bi bar chart show zero value
Power bi bar chart show zero value

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.
Power bi clustered bar chart
Power bi clustered bar chart
  • 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.
conditional formatting in power bi
conditional formatting in power bi
  • 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
default data color in power bi bar chart
default data color in power bi

Now you can see the Power Bi bar chart color based on the value.

power bi bar chart color based on the value
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.
default data color in power bi
default data color in power bi

Now you can see the Power Bi bar chart color based on the custom value.

Power Bi bar chart color based on the custom value
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.
Power Bi bar chart with multiple values
Power Bi bar chart with multiple values
  • 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 multiple values
Power bi bar chart with multiple values

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.
field formatting in power bi bar chart
field formatting in power bi bar chart
  • 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.
Power Bi bar chart example
analytics power bi
  • 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
constant line in power bi bar chart
constant line in power bi bar chart
  • 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.
data label in power bi bar chart
data label in power bi

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 with target
power bi bar chart with target

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).
Power Bi bar chart group by month
Power Bi bar chart group by month
  • Click on the fork icon to expand all down one level in the hierarchy(date).
Power Bi bar chart group by month
Power Bi bar chart group by month
  • Now you can see the Stacked bar chart grouped by month based on Sales by year, month, and year.
power bi bar chart group by month
power bi bar chart group by month

You may like the following Power BI tutorials:

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
>