Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

New Member

RANKX not working properly (Adding 1 to the Rank when filtering a selection)



I have a retail dashboard, where I analyse sales performance by band. I have 3 formulas that rank all Brands by the store (based on the type of product sold).


- Niche Rank (Ranks all sales from 'Niche' products)



    NOT ( ISBLANK ( [NicheSales(TY)] ) ),
    RANKX (
        FILTER ( ALL ( 'Niche Dashboard'[FINAL BRAND]), NOT ( ISBLANK ( [NicheSales(TY)] ) ) ),



- Classic Rank (Ranks all sales from 'Classic' products)



RANK(CLASSIC) = RANKX(ALL('Niche Dashboard'[FINAL BRAND]),[ClassicSales(TY)])



- Overall rank (Ranks total sales)



RANK(OVERALL) = RANKX(ALL('Niche Dashboard'[FINAL BRAND]),[NDAllSales(TY)])




However, I noticed that when all brands are selected, the RANKX fuctions works perfectly, but if I select just 1 brand (see the second picture) the ranks go up by 1 for the selected brand. I have no idea what the issue is.


rank(without filter).png



rank(with filter).png


Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors