Forum Discussion
Workaround for error: cannot sort col1 by col2?
I am trying to understand this strange behavior...
I have 2 calculated columns… CalcColumn1 is sorted by CalcColumn2. This is in the model, and I am using a pbix and it works fine.
Now, if I try deleting both calculated columns and recreating them; I am unable!!! I get the error:
How is it possible that it works fine? The pbix uses the column just fine.
3 Replies
- amitchandakSuper User
Anonymous , Not very clear with the error, Need more details. First, delete the column which has to mean based column for sort column then delete the sort column.
Also try. Close and open the file and try to delete again
- AnonymousNot applicable
Hi Anonymous
I think if you only delete two calculated columns and rebuild them, there won't show this error. Did you change the logic of calculated columns?
Please check if there are duplicates in your column1, and if there are different values in column2 for the duplicates in column1.
Sample:
This will cause sorting errors.
Please check whether your column2 is created based on column1, this may cause an error as well.
If this reply still couldn't help you solve your problem, please share a sample without sensitive data by your Onedrive for Business with me.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou