Power BI Bar Chart + Examples

This Power BI tutorial will help you how to work with the Power BI Bar chart.

In this article, we will explain what is a bar chart, what a stacked bar chart, what a clustered bar chart, and what a 100% stacked bar chart.

Also, I will tell how to create a bar chart, stacked bar chart, clustered bar chart, and 100% stacked bar chart with various examples.

Power BI Bar Chart

In Power BI, a bar chart is like a picture that shows information using bars of different lengths. These bars help compare values. Each bar stands for a group, and the length of the bar tells you how much there is for that group.

For example, you have a list of products, and you want to see each product’s sales value.

Power BI Bar Chart

How to create a bar chart in Power BI

I have a SharePoint list (Finance Sample) that contains below columns with various data types:

ColumnDatatype
CountrySingle line of text
ProductSingle line of text
Units SoldNumber
ManufacturingNumber
Sale PriceCurrency
ProfitCurrency
SalesCurrency
Gross SalesCurrency
create a bar chart in Power BI

Now open Power BI and load the Sharepoint list in Power BI Desktop.

1. Select the Stacked bar chart below the Visualizations panel in the Power BI Desktop. You see the one empty bar chart added to the report view.

Power BI stacked bar chart

2. Here, I want to display the Sum of Sales by Country in a bar chart. To do so, drag the “Country” Column into the Y-axis field and the “Sales” into the X-axis field.

bar chart in Power BI

In these steps, you can create a bar chart in Power BI.

Types of Power BI Bar chart

In Power BI, there are three types of bar charts available:-

  • Stacked Bar Chart
  • Clustered Bar Chart
  • 100% Stacked Bar Chart

Power BI Stacked Bar Chart

In Power BI, a stacked bar chart is similar to stacking differently colored blocks on top of one another. Each block represents a portion of the whole, and the height of the stacked blocks shows the total for each category.

How to create a Stacked Bar chart in Power BI

Now, Open Power BI and load data, then click the Stacked bar chart below the Visualizations panel.

Power BI stacked bar chart

Here, I want to display the Sum of Sales by Product and Country in a stacked bar chart.

So do this: drag “Product” into the Y-axis field, “Sales” into the X-axis field, and “Country” into the Legend field. Check the screenshot below.

Create bar chart in Power BI

Using these processes, you can create a stacked bar chart.

Power BI Clustered Bar Chart

It is a type of bar which used to display a series of two or more data sets in horizontal clustered bars.

How to create a Clustered Bar chart in Power BI

1. Open Power BI and load data then, In the below Visualizations panel, select the Clustered bar chart. Then, an empty clustered visual was added to the report page.

how to create bar chart in Power BI

2. Now, I will create a clustered bar chart that displays the Sum of Sales and Sum of Profit by Product. So drag the “Product” into the Y-axis, and drag the “Sales” and “Profit” into the X-axis. Here, choose the value as the Sum of Profit and Sum of Sales as shown in the figure below:

Use of clustered bar chart in power bi

In this way, you can create a clustered bar chart.

Power BI 100% Stacked Bar Chart

In Power BI, a 100% stacked bar chart is like a bar chart where the total height of the bars always adds up to 100%. Each bar represents a category, and the segments within the bar show the proportion of different components or values.

How to create a 100% Stacked Bar chart in Power BI

1. Open Power BI Desktop and load data, then click on the 100% Stacked Bar chart below the Visualizations panel. After that, an empty 100% Stacked Bar chart was added.

100% Stacked Bar Chart in Power bi

2. Here, I want to display the sum of profit by product and country in a 100% stacked bar chart. So, drag “Product” into the Y-axis field, “Profit” into the X-axis field, and “Country” into the Legend field.

how to create 100% Stacked Bar Chart in power bi

In this way, you can create a 100% stacked bar chart.

Power BI Bar Chart with Multiple Values

I will show you how to create a stacked bar chart with multiple values in Power BI Desktop.

1. Open Power BI Desktop and load the SharePoint list, then click the stacked bar chart under the visualization panel.

power bi stacked bar chart with multiple values

Here, we show multiple values; drag and drop two data source columns into the X-axis field in the Visualizations navigation.

2. Now drag “Product” into the Y-axis; in the X-axis, drop “Profit” and “Sales.”Check the screenshot below.

Power BI stacked bar chart with Multiple values

Follow the above steps to create a stacked bar chart with multiple values.

Power BI Bar Chart Shows the Value and Percentage

Now, I will tell you how to show the value and Percentage in a bar chart.

1. In this example, first, we create a bar chart that displays the Sum of sales by Product. The Y-axis contains “Product,” and the X-axis contains “Sum of Sales.”

Power BI bar chart show percentage

2. For the Percentage, we created a new measure. Goto Modeling -> Click New Measure.

power bi show value and percentage

3. Under the formula bar, add the below DAX.

Syntax:

Percentage = (SUM(tablename[valuefield])/CALCULATE(SUM(tablename[valuefield]),ALL(tablename[categoryfield])))
  • In my case, the formula is:
Percentage = (SUM('Financial Sample'[ Sales])/CALCULATE(SUM('Financial Sample'[ Sales]),ALL('Financial Sample'[Product])))
Power BI Chart Shows the Value a Percentage

4. Clicking the “%” symbol in the Formatting section after entering the formula. Then click commit. Check the screenshot below.

How to Show Percentage in Power BI Bar Chart

5. You see one Percentage (measure) added to your Data panel.

Showing % in Power BI bar chart

6. Drag the Percentage into “Tooltips” below the Visualgitons Panel. Now the bar chart displays the Sum of Sales and Percentage by Product.

Power BI bar chart show value and Percentage example

7. When you hover over the bar, a Tooltips dialog box opens, and you see the percentage of the product.

Bar chart with percentage in Power BI

Follow the above steps to create a bar chart showing the value and percentage.

Power BI Adds a Line to the Bar Chart

Now, I will show you how to add a line to the bar chart.

For this example, we have a product and sales data set. Now, add a constant line to the chart.

1. I created a bar chart that displays the Sum of Sales by Product. The Y-axis contains “Product,” and the X-axis contains “Sum of Sales.”

Power BI adds a line to the bar chart

2. Then, we add a line to the chart; click on analyses to your visual under the Visualizations panel. Add a Constant line to the bar chart.

How Can I Add a line to a Chart in Power BI

3. First, give the name of the line. Enter the value for the constant line. Customize the line style and color as desired.

In my case, the name given is ‘Constant Sales,’ with a specified value of 1500000. and the line color is set to black

Power BI adds a Constant line to the bar chart

Following the above steps, we can add a constant line to the bar chart.

Conclusion

I hope this tutorial is helpful to you. This tutorial covers the fundamentals of bar charts, explaining their types. Additionally, we learned to create various visuals, such as the bar visual, stacked bar, clustered bar, and 100% stacked bar visualizations.

Also, I explained some real-time examples in the Power BI Bar chart.

Moreover, you may like some more Power BI tutorials: