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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DmitryKo
Helper IV
Helper IV

"Sort by column" not working (as expected)

In the model there is a "D_Status" dimension that is a table with just one text field - status. I want, when sorting by status, to sort using logical order and not text-sort over "status" field. To do so, a numeric column "StatusOrder" is added to D_Status table and appropriate values are set.

Expected behavior: in visuals, when doing "sort by-status", the data is being sorted using number sort over "StatusOrder" for appropriate status.
Actual behavior: the data is still being sorted using text sort over status name


Column configuration:

DmitryKo_0-1679223012317.png



EDIT: to be more specific. I am using "Status" column as a legend for stacked area chart visual. I expect stacked areas to be ordered based on StatusOrder value corresponding to the appropriate status, asc or desc as configured. Instead, they are ordered based on text sort over Status (text field).

I've seen posts about "sort by column" not working dated back to 2017. It this still not working?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

hI @DmitryKo ,

I ahve created a simple sample, please refer to my pbix file to see if it helps you.

vpollymsft_0-1679362806736.png

 

To set a different column to sort by in Power BI Desktop, both columns need to be at the same level of granularity.

 

I ahve also found a similar psot, please refer to it to see if it helps you.

Solved: Sort not working - Microsoft Power BI Community

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
DmitryKo
Helper IV
Helper IV

This is STILL NOT WORKING for stacked area chart in April of 2024.

Anonymous
Not applicable

hI @DmitryKo ,

I ahve created a simple sample, please refer to my pbix file to see if it helps you.

vpollymsft_0-1679362806736.png

 

To set a different column to sort by in Power BI Desktop, both columns need to be at the same level of granularity.

 

I ahve also found a similar psot, please refer to it to see if it helps you.

Solved: Sort not working - Microsoft Power BI Community

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am having a similar issue with a stacked bar chart, which doesn't have the sort axis option. Any suggestions to properly sort my x-axis using an index without the sort axis option? Nothing in my visual changes when I ssort by the index column using column tools.

This is not a solution, this has been incorrectly marked as a solution. It's not working this way and has been in "not working" state since 2017.

Whoever (I assume mods) marked this as a solution in a rush for personal KPIs (number of posts "answered"), you're not helping the community at all; you're destroying it.

A pity.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors