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
jxkang
Frequent Visitor

Power BI Map Dynamic Level of Location

I would like to create a map visualization that changes the level based on "Country" slicer.

 

If there is only one selection and the selected value is "United States", then the map should show in "State" level.

If there is only one selection and the selected value is NOT "United States", then the map should show in "City" level.

If there are more than one selection in the Country Slicer, then the map should show in "Country" level.


Is this something that is possible?

1 ACCEPTED SOLUTION
MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @jxkang 

 

The native visual doesnt support this definitely.

 

One way to go by would be using bookmark and dax to show any of the 3 visuals based on selected value but I wouldnt recommend this.

 

You could try using a Field Paramter with 3 fields Country, State and City

 

Then have a measure to control this selection

SelectedLevel =

VAR CountrySelected = SELECTEDVALUE('YourTable'[Country])

VAR CountCountries = DISTINCTCOUNT('YourTable'[Country])

RETURN

   IF(

      CountCountries > 1,

      "Country",

      IF(

         CountrySelected = "United States",

         "State",

         "City"

      )

   )

 

You could probably display a card and use this to change the slicer appropriately based on recommendation.

 

 

If definitely it needs to be automatic then bookmarks works like this:

 

3 visuals and manage visibility (i.e visual level filters):

ShowCountryMap = IF([SelectedLevel] = "Country", 1, 0)

ShowStateMap = IF([SelectedLevel] = "State", 1, 0)

ShowCityMap = IF([SelectedLevel] = "City", 1, 0)

 

Set it to 1 in each of the 3 visuals after creating them

View solution in original post

3 REPLIES 3
v-kpoloju-msft
Community Support
Community Support

Hi @jxkang,

Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to @MohamedFowzan1, fot his inputs on this thread. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.

vkpolojumsft_0-1755080090368.png

I am also including .pbix file for your better understanding, please have a look into it:

Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.

Thank you for using the Microsoft Community Forum.

MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @jxkang 

 

The native visual doesnt support this definitely.

 

One way to go by would be using bookmark and dax to show any of the 3 visuals based on selected value but I wouldnt recommend this.

 

You could try using a Field Paramter with 3 fields Country, State and City

 

Then have a measure to control this selection

SelectedLevel =

VAR CountrySelected = SELECTEDVALUE('YourTable'[Country])

VAR CountCountries = DISTINCTCOUNT('YourTable'[Country])

RETURN

   IF(

      CountCountries > 1,

      "Country",

      IF(

         CountrySelected = "United States",

         "State",

         "City"

      )

   )

 

You could probably display a card and use this to change the slicer appropriately based on recommendation.

 

 

If definitely it needs to be automatic then bookmarks works like this:

 

3 visuals and manage visibility (i.e visual level filters):

ShowCountryMap = IF([SelectedLevel] = "Country", 1, 0)

ShowStateMap = IF([SelectedLevel] = "State", 1, 0)

ShowCityMap = IF([SelectedLevel] = "City", 1, 0)

 

Set it to 1 in each of the 3 visuals after creating them

MohamedFowzan1
Solution Specialist
Solution Specialist

Hi @jxkang 

 

The native visual doesnt support this definitely.

 

One way to go by would be using bookmark and dax to show any of the 3 visuals based on selected value but I wouldnt recommend this.

 

You could try using a Field Paramter with 3 fields Country, State and City

 

Then have a measure to control this selection

SelectedLevel =

VAR CountrySelected = SELECTEDVALUE('YourTable'[Country])

VAR CountCountries = DISTINCTCOUNT('YourTable'[Country])

RETURN

   IF(

      CountCountries > 1,

      "Country",

      IF(

         CountrySelected = "United States",

         "State",

         "City"

      )

   )

 

You could probably display a card and use this to change the slicer appropriately based on recommendation.

 

 

If definitely it needs to be automatic then bookmarks works like this:

 

3 visuals and manage visibility (i.e visual level filters):

ShowCountryMap = IF([SelectedLevel] = "Country", 1, 0)

ShowStateMap = IF([SelectedLevel] = "State", 1, 0)

ShowCityMap = IF([SelectedLevel] = "City", 1, 0)

 

Set it to 1 in each of the 3 visuals after creating them

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors