Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sugar_sugar
Regular Visitor

sort by multiple criteria

In Power BI Desktop, I am able to sort by multiple criteria when I set it up in a table first and then create a graph. However, when I create a bar chart, drill down to change it to a table and set the sorting, and then change it back to a bar chart, the sorting is not reflected. How can I sort by multiple criteria in this case?

 

NG.pngOK.png

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @sugar_sugar - In the data model view, create a new calculated column:.

Sort your data by the new SortKey column.

SortKey = [Category] & "-" & [SubCategory]

 

Sort your data by the new SortKey column.

Apply the sort in a bar chart:

  1. Add the Product,Category,Subcategory and Value columns to your bar chart.
  2. Select the bar chart visual, go to the Visualization pane, and find the Sort by dropdown.
  3. Choose SortKey from the dropdown to sort by your custom column.

 

rajendraongole1_1-1717566558209.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @sugar_sugar - In the data model view, create a new calculated column:.

Sort your data by the new SortKey column.

SortKey = [Category] & "-" & [SubCategory]

 

Sort your data by the new SortKey column.

Apply the sort in a bar chart:

  1. Add the Product,Category,Subcategory and Value columns to your bar chart.
  2. Select the bar chart visual, go to the Visualization pane, and find the Sort by dropdown.
  3. Choose SortKey from the dropdown to sort by your custom column.

 

rajendraongole1_1-1717566558209.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@rajendraongole1 

Thank you for your reply!

I understand that creating a sort key is the most reliable method.

By the way, is it possible to use these sorting conditions? (Sorry for the image in Japane)

 

sort.png

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors