Forum Discussion
Issue sorting column by another column
Hi I am having an issue sorting column by another column.
thanks
Richard
Hi I found a solution to my own problem.
By grouping ExpiryAnalysis_1 as shown below
I was able to add this grouping to the x axis of mychart
7 Replies
- amitchandakSuper 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- cottreraPost Prodigy
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
- manvishah17Solution Supplier
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:
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.
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!
- cottreraPost Prodigy
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
- Uzi2019Community Champion
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=xUaJQxLrdCQhttps://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 2B 2
C 3
C 3If 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!
- cottreraPost Prodigy
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
- cottreraPost Prodigy
Hi I found a solution to my own problem.
By grouping ExpiryAnalysis_1 as shown below
I was able to add this grouping to the x axis of mychart