Do you work in Power BI and don’t know how to sort bar charts? In this article, I will help you understand how to sort bar chart in Power BI report with an example.
How to Sort Bar Chart in Power BI
When we create a bar chart, you must see, by default, that it is sorted by values in descending order, but we can sort it in ascending order in simple steps.
Here, I connected the SharePoint List to Power BI Desktop. If you don’t know how to connect the SharePoint List to Power BI, click here.
Here is the SharePoint list that I am using for this Bar chart. You must have a SharePoint list before creating and sorting the bar chart. See the screenshot below:
1. Now select the stacked bar chart under the visualization panel.
2. I want to show the “Sum of sales by Product Name”. So, drag “Product Name” into the “Y-axis” and then drag “Sales” into the “X-axis” field. Here, choose the value as Sum of Sales as shown in the figure below:
3. Select the bar chart. Click on the upper-right side of our visual. You will find the More Options (3 dots) button. Then, the dialog box opened. In the dialog box, click “Sort axis”.
“Product Name” means the alphabet, and “Sum of Sales” means value. We can sort by value (ascending/descending) or alphabet (ascending/descending).
4. Select “Product Name” and “Sort ascending” and see the changes in the screenshot below.
Here, you see the above bar chart sorted in alphabetical ascending order.
5. Select “Product Name” and “Sort descending” and see the changes in the screenshot below.
This way, we can sort the bar chart in Power BI Desktop.
I hope you follow the above steps to sort the bar chart in Power BI. In this tutorial, we learned how to ascend or descend sort the bar chart in Power BI Desktop.
Also, you may like some more Power BI tutorials:
- How to Create a Power BI Pie Chart? + Formatting
- Create a Measure in Power BI
- Create a Table in Power BI
- Set Default Slicer Value in Power BI
Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.