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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cottrera
Post Prodigy
Post Prodigy

Issue sorting column by another column

Hi I am having an issue sorting column by another column.

cottrera_0-1718010017577.png

thanks

Richard

 

 

1 ACCEPTED SOLUTION
cottrera
Post Prodigy
Post Prodigy

Hi I found a solution to my own problem.

By grouping ExpiryAnalysis_1  as shown below

 

cottrera_0-1718016947817.png

I was able to add this grouping to the x axis of mychart 

cottrera_1-1718017067785.png

 



View solution in original post

7 REPLIES 7
cottrera
Post Prodigy
Post Prodigy

Hi I found a solution to my own problem.

By grouping ExpiryAnalysis_1  as shown below

 

cottrera_0-1718016947817.png

I was able to add this grouping to the x axis of mychart 

cottrera_1-1718017067785.png

 



Uzi2019
Super User
Super User

Hi @cottrera 

yup this issue occurs when your sort by column having multiplt duplicate values. sort by column works perfectly when you have unique records in your column.

 

try below videos for better understanding
https://www.youtube.com/watch?v=xUaJQxLrdCQ

 

https://www.youtube.com/watch?v=SxFp8NJpjz0

 

Note: try to reset your power bi file. sometime cache also causes the same issue. 
if you have similar format like beloe
No: sort by column
A      1
A      1
A      1
B      2

B      2
C     3
C     3

 

If you hsve similar format structure then must be cache issue. try to reset of install new PBI version may help you to fix aboev problem.

 

I hope i answer your qustion!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Thank you for your quick repons, all very usefull points that you provided. However I now found a solution to my problem which will post

 

Richard

manvishah17
Responsive Resident
Responsive Resident

Hi , You are trying to sort the data in 'ExpiryAnalysis_1' based on the values in 'Order_'. 

  • Uniqueness Requirement: For the sorting operation to work, each value in 'ExpiryAnalysis_1' should correspond to a single, unique value in 'Order_'. However, in your data, it seems that there are instances where a single value in 'ExpiryAnalysis_1' is associated with multiple different values in 'Order_'.

  • Conflict: The presence of multiple 'Order_' values for the same 'ExpiryAnalysis_1' value creates a conflict, preventing the sort operation from being performed as intende

     

     

    To resolve this issue, you need to ensure that each value in 'ExpiryAnalysis_1' has a unique corresponding value in 'Order_'. Here are some ways to do that:

    1. Select a Different Column for Sorting: If another column in your dataset has a unique value for each 'ExpiryAnalysis_1' entry, you can use that column instead.

    2. Aggregate 'Order_' Values: Combine the multiple 'Order_' values into a single value for each 'ExpiryAnalysis_1'. For example, you might take the average, maximum, or sum of the 'Order_' values.

       

       

      If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
      If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

@cottrera

Thank you for your quick repons, all very usefull points that you provided. However I now found a solution to my problem which will post

 

Richard

amitchandak
Super User
Super User

@cottrera , seem like there no one-to-one mapping between the values of the column and the sort column

 

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

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

Thank you for your quick repons, all very usefull points that you provided. However I now found a solution to my problem which will post

 

Richard

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.