Skip to main content




Power BI Stacked Bar Chart The bar chart is useful for comparing multiple dimensions with a single measure. Let me show you how to create a stacked bar chart in Power BI with an example.

For this Power BI stacked bar chart demo, we will use the SQL data source that we created in our previous article. Therefore, see the article Connect Power BI to SQL Server to understand the Power BI data source.

How to Create a Power BI Stacked Bar Chart

To create a stacked bar chart in Power BI, first drag and drop the Sales Amount section of the fields onto the region of the canvas. Automatically create a column chart, as shown in the following screenshot.

power-bi-stacked-bar-chart-1-4180557

By clicking on the stacked bar chart below the Display section, automatically converts column chart to stacked bar chart

power-bi-stacked-bar-chart-2-1244708

Next, let me add Color to the Axis section to create a bar chart showing the sales amount by color.

power-bi-stacked-bar-chart-3-6796420

Next, we add the English country region name to the Legend section to make it the stacked bar chart.

power-bi-stacked-bar-chart-4-3750403

This time, we add the name of the state province to the axis and the country to the legend. In the following screenshot, you can see that the country name acts as the color of the bar. It's because you can't group country names within a state (state name inherited from country). Remember this while working with a stacked bar chart.

power-bi-stacked-bar-chart-5-8389269

Hover over any stacked bar to display the state name, country, and sales amount tooltip

power-bi-stacked-bar-chart-6-6025569

Create a Power BI Stacked Bar Chart Approach 2

First, click on the stacked bar chart below the Display section. Automatically creates a stacked bar chart with fictitious data, as shown in the following screenshot.

power-bi-stacked-bar-chart-7-1728348

To add data to the Power BI stacked bar chart, we have to add the required fields:

  • Axis: Specify the column that represents the horizontal bars.
  • Legend: Specify the column to split the horizontal bars.
  • Values: Any numerical value such as sales amount, total sales, etc.

Let me drag the sales amount from the Fields section to the Values field and the Color field to the Axis section.

power-bi-stacked-bar-chart-8-7223902

Next, add the English country region name from the DimGeography table to the Legend section. You can do this by dragging Country to the Legend section, or just check the Country Region Name column in English

power-bi-stacked-bar-chart-9-1275697

You can now see a stacked bar chart representing sales by color, further divided by country name. Hover over any part of a bar that displays the Tooltip for Color, Country, and your Sales Amount.

power-bi-stacked-bar-chart-10-1864144

Let me apply a quick format to this Power BI stacked bar chart

NOTE: I suggest you refer to the Format Stacked Bar Chart article to understand the steps required to format the stacked bar colors, chart title, data color, background color, axis colors, style, and colors. axis sources, etc.

power-bi-stacked-bar-chart-11-1886254