Skip to content Skip to sidebar Skip to footer

Power Bi Sort Order Of Stacked Bar Chart

Power BI is a business analytics service that provides interactive visualizations and business intelligence capabilities. One of its popular visualization types is the stacked bar chart. The stacked bar chart represents data in a horizontal or vertical bar chart format, where each bar represents a category and is divided into multiple parts to show the proportion of each sub-category.

Sorting Stacked Bar Chart by Category

Sorting Stacked Bar Chart In Power Bi

By default, Power BI sorts the stacked bar chart by the total value of all sub-categories. However, it's possible to sort the chart by the category axis. To do this, select the stacked bar chart and go to the Visualizations pane. Expand the "X-Axis" section and enable the "Data" category. Then, click on the "Sort ascending" or "Sort descending" button to sort the categories accordingly.

Sorting Stacked Bar Chart by Sub-Category

Sorting Stacked Bar Chart In Power Bi

If you want to sort the stacked bar chart by a specific sub-category, you can use the "Sort by Column" feature. First, create a new column in your dataset that contains the values you want to sort by. Then, go to the Visualizations pane and select the stacked bar chart. In the "Values" section, click on the ellipsis icon next to the sub-category you want to sort by and choose "Sort by Column". Finally, select the column you created in the previous step.

Sorting Stacked Bar Chart by Measure

Sorting Stacked Bar Chart In Power Bi

Another way to sort the stacked bar chart is by using a measure. A measure is a calculated value based on the data in your dataset. To sort the chart by a measure, first create a new measure that calculates the values you want to sort by. Then, go to the Visualizations pane and select the stacked bar chart. In the "Values" section, click on the ellipsis icon next to the sub-category you want to sort by and choose "Sort ascending" or "Sort descending". Finally, select the measure you created in the previous step.

Sorting Stacked Bar Chart by Custom Order

Sorting Stacked Bar Chart In Power Bi

If you want to sort the stacked bar chart by a custom order, you can use the "Sort by Column" feature with a custom column. First, create a new column in your dataset that contains the categories in the order you want them to appear. Then, go to the Visualizations pane and select the stacked bar chart. In the "X-Axis" section, enable the "Data" category and click on the "Sort ascending" or "Sort descending" button. Finally, select the custom column you created in the previous step.

Conclusion

Sorting the stacked bar chart in Power BI is a useful feature that allows you to present your data in a meaningful way. You can sort the chart by category, sub-category, measure, or custom order, depending on your requirements. By using these sorting techniques, you can create a more informative and visually appealing stacked bar chart.

Related video of Power Bi Sort Order Of Stacked Bar Chart