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
jcesguerra
New Member

Error message when sorting by another column

Hi

I used to be able to sort a column by an aorder set in another column with no problem But now I get this error message: "We can't sort the 'X' column by 'Y'. There can't be more than one value in 'Y' for the same value in 'X'. Please choose a different column for sorting or update the value in Y"
I have checked my data several times already and i don't have more than one value in the sorting column for the same value in the other column. 
I have read in other forums questions sugesting that this might be a recent bug. Does anyone know of a solution?

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@jcesguerra Sorry, let me try again:

 

- add a table visual

- add the column that you are trying to sort

- add the column that you are using for sorting

- add the following measure in the table visual

 

Measure = DISTINCTCOUNT ( Table[SortByColumn] )

 

click on the Measure heading in the visual to sort by measure, and see if there is any value which is greater than 1 and that where the problem lies.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@jcesguerra yes could be

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@jcesguerra Sorry, let me try again:

 

- add a table visual

- add the column that you are trying to sort

- add the column that you are using for sorting

- add the following measure in the table visual

 

Measure = DISTINCTCOUNT ( Table[SortByColumn] )

 

click on the Measure heading in the visual to sort by measure, and see if there is any value which is greater than 1 and that where the problem lies.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

they all have a value of 1... including the blank. maybe that's the problem?
(thanks a lot for your help!)

parry2k
Super User
Super User

@jcesguerra May be try this, add actual and the sort column and the measure that counts the rows, and check if any of the rows has more than 1 value, it means that is duplicate. Sometime whitespace can lead to these issues which otherwise are not visible.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

i'm sorry, i don't understand what you mean. could you explain again please?

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.