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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jxkang
Regular 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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors