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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Sort graph axis values (DAX generated)

Hello community,

 

I have created a Boxplot chart showing salary distribution per category. The categories are retrieved from a table that was created by DAX. As you can see in the photo, the categories order is random and I want to sort the categories so I have L3, L5, L6.

 

How can I do that? 

 

Thanks in advance 🙂screenshot boxplot.png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Create a sort column mark that as sort column and sort visual on axis

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Thank you for your feedback @amitchandak 

what I did to resolve this problem , is that i Created the ID column in the DAX code that I used to generate my table. By so doing, I have no dependency between category and ID_cat so. COnsequently, when I used sort column by ID_Cat it worked successfully.

 

Conclusion: try to avoid circular dependency

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you for your feedback @amitchandak 

what I did to resolve this problem , is that i Created the ID column in the DAX code that I used to generate my table. By so doing, I have no dependency between category and ID_cat so. COnsequently, when I used sort column by ID_Cat it worked successfully.

 

Conclusion: try to avoid circular dependency

 

amitchandak
Super User
Super User

@Anonymous , Create a sort column mark that as sort column and sort visual on axis

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.