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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ketan10
Advocate III
Advocate III

Need Help | Filter Map by 'Top N' where ranking is done using a measure

We have a dynamic slicer (Top 5/10/25/ALL).

Using this slicer we are calculating the following table.(please refer the TABLE image below)
Untitled.png


In this table we are dynamically ranking the 'Sellers' by the volume

[DynamicRankMeasure] = IF(RANKX(ALLSELECTED(tblImportMaster[Shipper]),[ SelectedMeasure],,DESC)<=[ SelectedTopNValue],[ SelectedMeasure],BLANK()) 



So if we select top 5, then the table would show the top 5 sellers by volume (and their respective data). Now there is a column called 'SellerCountryCount' which basically gives us the distinct count of 'countries' where the seller is located.

Now, I need to plot these two distinct countries on the map.


Example:

If I select top 5 sellers, I get the this data. But if you notice I just have two distinct countries in the table. So I need to plot these 'two countries' only.

Currently the map shows all the countries in my data when I put 'Country' on the location and 'Volume' (based on the rank) on the color saturation


Can we achieve this using DAX in Power BI ? Any help here would be appreciated. Thank you.

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi ketan10,

 

Does "Country" column have relationship between table 'tblImportMaster'? You should build a relationship between Country column and 'tblImportMaster'[seller] column and try again.

 

Regards,

Jimmy Tao

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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