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 filter includes values with no data

Hi Folks,

I'm using a RankX function and a slicer in my report. 

 

Slicer is to view Data of particular Country and Year. RankX function for the Rank of increase in population for countries.


RankX function is working fine when i have data for all the countries.
When i change the year (let suppose 2020, and data for some countries is missing) so it gives me rank skipped for those countries.


Capture.JPG

 But when i select these two countries manually from the slicer then the data is correct.

Thanks for your help in advance.

Gaurav Jangra

 

 

 

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description,I think your formula don't consider 'year'.You can try to change your formula.

Like this:

Rank_Population_Inc% =
IF (
    NOT ( ISBLANK ( [Population_Inc%] ) ),
    RANKX (
        ALLSELECTED ( V_PopulationData),
        CALCULATE ( [Population_Inc%] ),
        ,
        ASC,
        SKIP
    )
)

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

It’s my pleasure to answer for you.

According to your description,I think your formula don't consider 'year'.You can try to change your formula.

Like this:

Rank_Population_Inc% =
IF (
    NOT ( ISBLANK ( [Population_Inc%] ) ),
    RANKX (
        ALLSELECTED ( V_PopulationData),
        CALCULATE ( [Population_Inc%] ),
        ,
        ASC,
        SKIP
    )
)

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , can you share the formula, Have you tried with the dense option?

https://www.youtube.com/watch?v=DZb_6j6WuZ0

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
Anonymous
Not applicable

Hi @amitchandak 

I am using Skip because i have to skip the rank for matching values.
Also tried the Dense but not gives me the solution.

the formula for the Rank Function is 
Rank_Population_Inc% = IF(NOT(ISBLANK([Population_Inc%])), RANKX( ALLSELECTED( V_PopulationData[Country_Name] ) , CALCULATE( [Population_Inc%]),,ASC,Skip ))

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.