Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I am applying the below RANKX formula,
| India | 100 | 1 | Asia | 
| Pakistan | 50 | 1 | Asia | 
| China | 90 | 1 | Asia | 
| Australia | 85 | 2 | Australia | 
| France | 70 | 3 | Europe | 
Solved! Go to Solution.
 
					
				
		
Hi @Antmkjr ,
Please check the formula.
Column = 
VAR rank_ =
    RANKX (
        'Table',
        CALCULATE (
            SUM ( 'Table'[Sales] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Continent] = EARLIER ( 'Table'[Continent] )
                    && 'Table'[Country] <> "France"
            )
        ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( 'Table'[Country] = "France", BLANK (), rank_ )
Best Regards,
Jay
 
					
				
		
Hi @Antmkjr ,
Please check the formula.
Column = 
VAR rank_ =
    RANKX (
        'Table',
        CALCULATE (
            SUM ( 'Table'[Sales] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Continent] = EARLIER ( 'Table'[Continent] )
                    && 'Table'[Country] <> "France"
            )
        ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( 'Table'[Country] = "France", BLANK (), rank_ )
Best Regards,
Jay
First >>
I can remove Sales from the context itself whenever I have France, In my case, it is "d"
New Rank = IF(Sheet3[Sub Category]="d",0,Sheet3[Column])
You can exclude these 0s in the main dashboard as needed, also Ranking will not affect, it will just exclude d/France
Regards,
Ritesh
Yes exactly
Yes excatly
@Antmkjr 
Please try
Rank =
RANKX (
    ALL ( 'Table'[Continent] ),
    CALCULATE (
        SUMX (
            CALCULATETABLE (
                FILTER ( 'Table', NOT ( 'Table'[Country] IN { "India", "China" } ) ),
                ALLEXCEPT ( 'Table', 'Table'[Continent] )
            ),
            'Table'[Sales]
        )
    )
)HI @Antmkjr 
Please try
Rank =
RANKX (
    FILTER (
        ALL ( 'Table'[Continent] ),
        CALCULATE ( VALUES ( 'Table'[Country] ) ) <> "France"
    ),
    CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Continent] ) )
)It is wrongly calculating Rank of France here as 2, as I mentioned, I want to exclude France from this Ranking.
@Antmkjr 
Just to properly understand your rquirement. If we exclude India and China for example, then Asia will be ranked 3? Is this what you want?
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |