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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
IAmAPowerBIUser
Frequent Visitor

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.

sortingerror.png

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”.

sortVisual.png

 

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

SortTest.png

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!

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
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.

BI_On_Rails_0-1714142569418.png

 

IAmAPowerBIUser
Frequent Visitor

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!

Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
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.

vkongfanfmsft_0-1713925153039.png

 

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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors