Forum Discussion

IAmAPowerBIUser's avatar
IAmAPowerBIUser
Frequent Visitor
2 years ago
Solved

Error when trying to "sort by column"

Hi,

I have a table Dim_answers including the columns “Text – Antwoord” and “Sorting ID”. I want to sort my “Text – Antwoord” column by the values of the “Sorting ID” column. But when I try this I get the following error message.

I cannot figure out where the error comes from, because for every value in my “Text – Antwoord” column there is only one distinct value in the “Sorting ID” column. To verify this I created a table visual using a column count all distinct values in “Sorting ID” for “Text – Antwoord”.

 

When using a small test table I created before there was no issue sorting Column1 by Column2.

I cannot see the crucial difference between my large table and the small test table being responsible for the error. Probably I am overlooking something very simple here.

I attached the PowerBI file to google drive.

https://drive.google.com/file/d/1nFC80S_liqnmCAYEqbd8sz4PRXwSncEN/view?usp=drive_link

 

Does anyone have an answer?

Thanks a lot!

 

 

 

  • Hi,

    I did not receive that error.  Furthermore, on the visual, click on the 3 dots and select Ascending.  In the Sort by, select Text - Antwood.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi IAmAPowerBIUser ,

     

    It is common to implement this sorting in power query. I.e. Text - Sorting ID column by Antwoord column. You can also observe the sorting order of the columns by looking at the numbers below.

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi,

    I did not receive that error.  Furthermore, on the visual, click on the 3 dots and select Ascending.  In the Sort by, select Text - Antwood.

  • Hi everyone,

    indeed when I restarted my laptop today and used sort by as described above the error did not appear again. It seems to have disappered by itself, but I still do not know what caused it and why it is gone.  Thanks everyone for your support!

  • BI_On_Rails's avatar
    BI_On_Rails
    Frequent Visitor

    I've been having the exact same problem yesterday and today. I have a clear 1:1 relationship, PowerQuery confirms it and still getting the same issue.