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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors