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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Connor888
Frequent Visitor

Sort by error, duplicate values where there appear to be none

Hi,

I'm trying to get one column to sort by another, and I'm getting the error that there are multiple sort-by values for each of the to-sort column's values:

Connor888_0-1715003666575.png


However when I summarize the two columns to try and spot where the error is, it looks like everything is correct:

Connor888_1-1715003731510.png

Is there something I'm missing, or is summarize not giving me the full picture?

Thanks!



1 ACCEPTED SOLUTION

As it happens I fixed things. Looks like it was just a Power BI bug - restarting has removed the error. Thanks for your help anyway!

View solution in original post

4 REPLIES 4
Kaviraj11
Super User
Super User

Please follow the steps below to have it work. Adjust it accordingly. 

Step 1

 Create a Custom Table with all the category either manually in Power Query or Summarize Table.

Create a new column beside and provide the number in the order you want to arrange.

 

Step 2

Create a relationship between the column in actual table to the custom sort table

Step 3

Create a column in Actual table with an expression.

Sort order = RELATED(CustomSortTable[Sort])

 

Step 4

Select the column you want to sort, and a “Column Tools” menu bar will appear at the top. Now Select the “Sort by column” and select the sort order column.




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

Proud to be a Super User!





Hi Kaviraj,

 

That is the setup I have, the field [BucketSort] in the image above is pulled in from another table with RELATED. I also tried using SWITCH within the calculated column, which also didn't work.

Would you able to share the pbix file or a sample file?




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

Proud to be a Super User!





As it happens I fixed things. Looks like it was just a Power BI bug - restarting has removed the error. Thanks for your help anyway!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.