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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
yamaro
New Member

Rankx excluding

Hello all,

 

I'm new using Power BI and I'm trying to create a Ranking based in a # by Country, but I want to exclude some of the countries from the ranking, is this possible? How can be done?

 

Thanks,

Yaitza

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@yamaro

 

Hi, use you can use a measure:

 

Rank-M =
RANKX ( ALLSELECTED ( Table1 ), CALCULATE ( SUM ( Table1[Sales] ) ),, DESC )

And apply a visual level filter to select the countries.

 

 

Filter.png

Regards

 

Victor

Lima - Peru




Lima - Peru

Hello @Vvelarde,

 

I tried that one, and didn't work. I'm trying to rank a measure, the measure was done for all the countries, not sure if that affect in the ranking.

 

Thanks

Hi @yamaro,

 

Would you please share some sample data and DAX of measure? Also please clarify the desired results regarding this sample data. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.