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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Sophie_
Frequent Visitor

Sort column by value

Hello,

 i want to sort my column partner_display by ecart_max

Sophie__0-1724146180004.png

 

when i try to do it by sorting i got this message :

Sophie__1-1724146376203.png

 

How can i sort my column by value ?

 

Reagrds,

Sophie

1 ACCEPTED SOLUTION

Hi @Sophie_ 

In the Query Editor (Transform data) go to your table and choose reference.

SamWiseOwl_0-1724232168039.png

Then highlight the two columns to keep and choose remove other columns. Then choose Remove duplicates

SamWiseOwl_1-1724232287661.png

 

Join this back onto your table in the front end and use this column instead of the original.

SamWiseOwl_2-1724232394503.png

 

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

3 REPLIES 3
SamWiseOwl
Super User
Super User

Hi @Sophie_ 

Could you split these two columns into a seperate table. 
Remove duplicates and then apply your sort.

Then join back to your original visual. That would remove the error as the seperate table is unique.

 

If you are using a chart visual, it is possibel to sort using a measure.

Create a measure that returns the MAX ID and put it in the tooltip. On the visual apply a sort.

SamWiseOwl_0-1724151972342.png

 

 

 

For anyone interested:
Sort by another column. We cannot sort the column ‘partner_display’ by ‘ecart_max’. You cannot have multiple values in ‘ecart_max’ for the same value in ‘partner_display’. Choose another column to sort or update the data in ‘ecart_max’


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hello @SamWiseOwl ,

do you have an exemple to di this : "

Remove duplicates and then apply your sort.

Then join back to your original visual. That would remove the error as the seperate table is unique." ?

 

I want to sort partner_display in filter.

 

Sophie

Hi @Sophie_ 

In the Query Editor (Transform data) go to your table and choose reference.

SamWiseOwl_0-1724232168039.png

Then highlight the two columns to keep and choose remove other columns. Then choose Remove duplicates

SamWiseOwl_1-1724232287661.png

 

Join this back onto your table in the front end and use this column instead of the original.

SamWiseOwl_2-1724232394503.png

 

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.