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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Tsoltvedt
Regular Visitor

TableSorter Custom Power BI Visual - Rankings

I'm using the Table Sorter visual to rank entries based on a score. For entries that have the exact same score the tool defaults to ranking based on alphabetical order. Is there a way to change this so that entries with the same score receive the same ranking? 

4 REPLIES 4
Tsoltvedt
Regular Visitor

For some reason, toggling "histograms" off and on under the "Presentation" tab fixes the problem temporarily but the tool reverts back to default ranking when publishing or re-starting Power BI Desktop.

amitchandak
Super User
Super User

@Tsoltvedt , Not sure on table sorter, But we usually use rank measure for rank

 

examples

Rank Discount % = RANKX(all("Item"[Category]),[Discount %],,DESC,Dense)
Rank Discount % (Brand) = RANKX(all("Item"[Brand]),[Discount %],,DESC,Dense)

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Many thanks for the reply. I have tried RANKX but the challenge I'm facing is that all the entries end up being ranked as 1. The table has four columns: 'Country', 'year-quarter', 'index', and 'score'. I'm trying to rank the countries based on their score for a specific index and year-quarter. I have tried the formula below but all countries end up ranked as 1:

RANKX(
    FILTER(
        'Global Indices R1',
        'Global Indices R1'[Year-Quarter] = SELECTEDVALUE('Global Indices R1'[Year-Quarter])
            && 'Global Indices R1'[Index name] = SELECTEDVALUE('Global Indices R1'[Index name])
    ),
    CALCULATE(
        MAX('Global Indices R1'[Score]),
        ALLEXCEPT('Global Indices R1', 'Global Indices R1'[Country Name])
    ),
    ,
    DESC
)

 

Many thanks for the reply. I have tried RANX but the challenge I'm facing is that I need the rank to be calculated based on the particualar configuration chosen in the slicer. The table contains data across different years/quarters and different categories. What I'm looking to do is get a rank that applies to the specific category and year/quarter selected. 

 

Table Sorter seems to do this, but as I mentioned in the initial post and reply there is a bug that means that the selection defaults away from the Dense ranking mode. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors