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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Advocate V
Advocate V

Sort by Column does not change sorting order



My goal:


List ONLY the names of the TOP 5 sales people in my organization by using the "Sort by column" feature. 


EDIT: The columns "FirstName" & "LineTotal" come from separate tables if that matters.


My steps so far:

  1. I added a simple table with the "FirstName" column, listing all the salespersons.
  2. I added a visual level filter with the "Top N" filter type set to 5, values from "LineTotal" sales column. Works fine, but the sorting is wrong.
  3. I then chose the table tile, chose the datatable where "LineTotal" is and clicked the "Sort by Column" button and chose "LineTotal" as the sort order. Nothing happens, the sorting does not change. 


If I add the "LineTotal" column to the table, I can see it correctly chooses the TOP 5 earners but the sorting is wrong:


PowerBI - Sort hidden column (2018-03-28).png


The only way to sort the columns correctly is to manually click the "LineTotal" sort arrow, but I don't want to display the column in the first place, only the names.


What am I doing wrong here?

Community Champion
Community Champion


Couple things you can do

1) If you do want to use the Sort by Column option you actually need to change the default sort of the FirstName column

so FirstName should Sort By LineTotal


2) Simply click the ellipsis (...) in the top right corner of the visual and select Sort by LineTotal (ZtoA)

Good Luck! Smiley Happy



Thanks for your reply @Sean!


1. How do I do this? I have currently chosen the tile, then I've chosen the "LineTotal" from the right side pane and then clicked on the "Sort by Column" button. It shows "LineTotal" shown as the sorting method, but it still sorts incorrectly.


2. I can't use this method since I don't actually want to list the sales values. I just added them to the screenshot to prove that the sorting does not work.


Another screenshot:


PowerBI - Sort hidden column 2 (2018-03-28).png




Community Champion
Community Champion

How are the two tables related?


1) Create a FirstName Rank Column in the Table containing FirstName

This Column should Rank DESC based on the Line Total from the other Table

2) Sort FirstName by this new Column

3) then Filter TOPN - show Bottom 5 - by value - sum of FirstName Rank


Hope this helps! Smiley Happy

They're related through my data model. The relation works properly in my report, there should not be an issue.


I think what's happening here is that I'm essentially using the sorting correctly, but PBI doesn't understand how to sort the sums correctly. I haven't tried creating a proper TOP N style column for this I did create a simple manual type of rank where I gave values to the employees from "1 to 5". Sorting that worked as expected. 

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.