Skip to content Skip to sidebar Skip to footer

Power Bi Show Percentage And Value On Stacked Bar Chart

Power Bi Show Percentage And Value On Stacked Bar Chart

Power BI is a widely used business analytics tool that allows you to visualize data using different types of charts, graphs, and tables. One of the most frequently used charts in Power BI is the stacked bar chart. This chart is used to show the relationship between different categories and their values. The stacked bar chart can also be used to show the percentage of each category in the total value. In this article, you will learn how to show both the percentage and value on a stacked bar chart in Power BI.

Creating a Stacked Bar Chart

Creating A Stacked Bar Chart

To create a stacked bar chart in Power BI, you need to have a dataset that contains the values for each category. Once you have your data, follow these steps:

  1. Select the data you want to use for the chart.
  2. Go to the "Visualizations" pane on the right side of the screen.
  3. Select "Stacked Bar Chart" from the list of available charts.
  4. Drag and drop the data fields into the "Axis" and "Values" boxes.
  5. Customize the chart as needed by changing the colors, labels, and legend.

Show Value on Stacked Bar Chart

Show Value On Stacked Bar Chart

To show the value on a stacked bar chart, you need to enable the data labels option. Follow these steps:

  1. Select the stacked bar chart you want to modify.
  2. Go to the "Visualizations" pane on the right side of the screen.
  3. Expand the "Data labels" section.
  4. Toggle the "Value" switch to "On".

Once you enable the data labels, the value for each category will be displayed on the chart.

Show Percentage on Stacked Bar Chart

Show Percentage On Stacked Bar Chart

To show the percentage on a stacked bar chart, you need to create a measure that calculates the percentage of each category in the total value. Follow these steps:

  1. Open the "Fields" pane on the right side of the screen.
  2. Click on "New Measure".
  3. Enter a name for the measure, such as "Percentage".
  4. Enter the following formula: Percentage = DIVIDE(SUM('Table'[Value]), CALCULATE(SUM('Table'[Value]), ALLSELECTED())) * 100
  5. Replace "Table" with the name of your dataset.
  6. Drag and drop the new measure into the "Values" box of the stacked bar chart.
  7. Select the stacked bar chart you want to modify.
  8. Go to the "Visualizations" pane on the right side of the screen.
  9. Expand the "Data labels" section.
  10. Toggle the "Value" switch to "Off".
  11. Toggle the "Percentage" switch to "On".

Once you create the measure and enable the percentage data labels, the percentage of each category in the total value will be displayed on the chart.

Conclusion

Power BI is a powerful tool that allows you to visualize data in many different ways. The stacked bar chart is a popular choice for showing the relationship between different categories and their values. By enabling the data labels option, you can show the value for each category on the chart. By creating a measure that calculates the percentage of each category in the total value, you can also show the percentage on the chart. With these tips, you can create informative and visually appealing stacked bar charts in Power BI.

Related video of Power Bi Show Percentage And Value On Stacked Bar Chart