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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

RANKX skipping number even when values are different

I have an issue where I've created a RANKX measure that at seemingly random skips a number/rank even though the measure/value that it's ranking on is different. 

The base value/measure:

 

Avg A= AVERAGE(v_Sales[A]) / 1000

 

Rank measure:

 

Rank_ValueA = 
RANKX(
    FILTER(
        ALLEXCEPT('v_Stores', dimMarket[Market]),
        [Avg A] > 0
    ),
    [Avg A],
    ,
    ,
    Dense
)

 

 Since I have different markets I want to rank within that market, which is why I have the "ALLEXCEPT"

 

Example of where it goes wrong, 47 is missing (first column is ID)

thne123_0-1723801876494.png

 

Another example, 60 is missing

 

thne123_1-1723801917961.png

On the table I have a filter for that market and a datefilet

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Update, I'm stupid, realised there was a global filter that affected the ranking, which I didn't think would affect... 

So incorportated that into the rank and now it's correct 

View solution in original post

7 REPLIES 7
lbendlin
Super User
Super User

What is

 

ALLEXCEPT('v_Stores', dimMarket[Market])

 

supposed to accomplish?

Anonymous
Not applicable

@lbendlin 

So that it ranks per market and not the total, at least that's the plan

You'd need to summarize rather than filter.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Anonymous
Not applicable

Here's an excel I hope is adequate 

https://www.transfernow.net/dl/20240816h0BBgLOA 

Thanks

That Excel file only has Store No. and Value columns.  Seems to be missing the Market column?

Anonymous
Not applicable

Oh, yeah for this example they're all in the same market. Since I want to have separate matrixes for all markets and rank per market

Anonymous
Not applicable

Update, I'm stupid, realised there was a global filter that affected the ranking, which I didn't think would affect... 

So incorportated that into the rank and now it's correct 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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