How can I display percentages in a stacked column chart using Power BI?

Power BI is a powerful data visualization and analysis tool that allows users to create various charts and graphs to represent data in an organized and visually appealing manner. One of the most commonly used chart types is the stacked column chart, which displays multiple data series stacked on top of each other. To accurately represent data in a stacked column chart, it is important to also display the corresponding percentages for each data series. This can be achieved in Power BI by simply enabling the “Data Labels” option and selecting the “Percentage” format. This will automatically calculate and display the percentage value for each data series in the stacked column chart, making it easier to interpret and compare the data. This feature enables users to effectively communicate the distribution and proportion of data in a visually impactful manner.

Power BI: Display Percentage in Stacked Column Chart


Often you may want to display percentages in a stacked column chart in Power BI, such as in the following chart:

Power BI show percentage in stacked column chart

Fortunately this is easy to do and the following step-by-step example shows how to do so.

Step 1: Load the Dataset

First, we will load the following dataset into Power BI that contains information about the gender and favorite sport of 20 individuals:

Step 2: Calculate the Percentages

Suppose that we would like to calculate the percentage of each gender that accounts for the total of each sport.

To do so, we can click the Table tools tab along the top ribbon, then click the New measure icon:

Next, type the following formula into the formula bar: 

Percent of Total = 
DIVIDE (
    COUNT('my_data'[Sport]),
    CALCULATE (COUNT('my_data'[Gender]), ALLEXCEPT('my_data', 'my_data'[Sport]))
)

Then click the dropdown arrow next to Format along the top ribbon and choose Percentage:

Step 3: Insert the Stacked Column Chart

To insert the stacked column chart, click the Report View icon on the left hand side of the screen:

An empty stacked column chart will be inserted:

Next, drag the Sport variable under the X-axis label, then drag the Gender variable under the Y-axis label, then drag the Gender variable under the Legend label, then drag the Percent of Total measure under the Tooltips label:

This will produce a stacked column chart where the x-axis displays the individual sports, the y-axis displays the total count of individuals who prefer each sport, and the colors represent the gender of the individuals:

When you hover over and individual bar in the chart, a tooltip will appear that shows the count of individuals represented by the bar along with the percentage that the gender represents of the total:

Power BI show percentage in stacked column chart

For example, there were 7 total individuals who preferred basketball as their favorite sport.

When we hover over the dark blue bar for the Basketball category, a tooltip appears that tells us 5 of the individuals were Males, which represented 71.43% of the total individuals (5/7) who preferred basketball as their favorite sport. 

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x