Column chart in Power BI

A Column Chart in Power BI is a vertical bar chart used to show comparisons among categories over time or across different groups. It's one of the most used visuals in Power BI and is great for displaying trends and comparisons in a clean, readable format.

Types of Column Charts in Power BI:

  1. Clustered Column Chart
    • Groups multiple values side by side for each category.
    • Best for comparing multiple series across categories.
  2. Stacked Column Chart
    • Stacks values vertically in a single column for each category.
    • Useful for showing the composition of a total.
  3. 100% Stacked Column Chart
    • Like a stacked column, but columns represent percentages (100% height).
    • Good for comparing relative contribution.

Let’s create a Column chart in Power BI:

Let’s add the Clustered column chart in Power BI from the Build pane. Also add the Country and GDP column from the Countries table to the X-axis and Y-axis respectively.

Column chart in Power BI

Let’s add another field or measure on the Y-axis. Now in the chart we can see two bars for each category as shown in the image below:

Column chart in Power BI

Now let’s change the chart type from clustered bar chart to the Stacked bar chart and see the difference. To change the chart type, select the visual and then click on clustered bar chart from the Build pane.

Column chart in Power BI

Now we can see that the bars are stacked on top of each other for each category.

Now let’s change the chart type to 100% Stacked bar chart and see the difference. Now we can see it is similar to stacked column chart, but its column values represent percentage to a column height.

Column chart in Power BI

Step 2: We can add multiple fields in the X-axis section. When we add multiple fields, we can drill up and drilldown with that fields in the visual.

Let’s add Year field in the X-axis. Once I add another field in the X-axis, the drill up and drill down icons are going are available in the visual as shown in the image below:

Column chart in Power BI

Right now, it is at Country level and let’s drill down to the Year click, by clicking on the “Go to the next level in the hierarchy”.

Column chart in Power BI

Now we can the values at the Year level.

Step 3: We have a lot of formatting options to format the visual. We can add Data labels in the visual to enhance the quick way to see the actual value of columns. We can decide its position, Title and format the value color, font size, underline, etc.

Column chart in Power BI

We can decide the Display units of the values like in None, Thousands, Millions, Custom etc. If we choose Custom option, then we can specify the custom format string for the values. We can specify the decimal places and if blank value is there then how it shows in the visual.

Column chart in Power BI

We can include the fields in the Details option to add more details to our data label. The value of this details field is calculated in the filter context.

Column chart in Power BI

Let’s we have added the Population and specify its formatting, like other fields.

Column chart in Power BI

Please note that we can format the color of data labels conditionally also that opens the opportunity to implement a custom logic to return the specify color for particular data point in the visual.

We can add only one detail field or measure in this visual. We can also specify the background colour for the Data labels and its Layout, i.e. Multi-line or Single line.

Column chart in Power BI

Multi-line layout means that each data label is shown in the separate line, whereas in Single line layout each data label is shown in the single line.

Step 4: In the Y-axis section we can specify the Minimum and Maximum range. The range can be specified conditionally also. We can format the values and its display units.

Column chart in Power BI

We can specify the Title of the Y-axis, and format it.

Column chart in Power BI

We can also format the X-axis, its Title and its values.

Column chart in Power BI

Step 5: In the Columns section, we can format the columns of the chart. We can specify the spacing between the columns.

We can specify a different colour for each category value by selecting the value from the Categories dropdown.

Column chart in Power BI

We can conditionally format the colours of the columns. To conditionally format the column colours, let’s we have created a measure which specifies the selected country value in the category and according to that we have specified the colour that we want.

DAX

Selected Country Measure = 
SWITCH(TRUE(),
    SELECTEDVALUE(Countries[Country]) = "USA", "Red",
    SELECTEDVALUE(Countries[Country]) = "China", "Green",
    SELECTEDVALUE(Countries[Country]) = "Brazil", "Yellow",
    SELECTEDVALUE(Countries[Country]) = "India", "Blue",
    SELECTEDVALUE(Countries[Country]) = "Germany", "Orange",
    "Gray"  -- Default color for all other countries
) 

Click the fx button next to the colour.

Column chart in Power BI

In the conditional formatting window:

And then click on Ok to save the changes.

Column chart in Power BI

The colours are changed as shown in the image below:

Column chart in Power BI

We can remove the conditional formatting by clicking on clear formatting icon. We can format other areas also in the visual, like the background of the visual, Title of the visual, etc.