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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Fidezuri1990
Helper I
Helper I

RE: Power BI Basic Map - Visual - Map Settings - Style

Hi All,

 

I am using the basic map and I choose the "Aerial" style as shown in the figure below.

Fidezuri1990_0-1731389881845.png

I would like my client (report user) to have the options to change the style as per the options listed in the figure (e.g. Road, GrayScale). Therefore, I would like to add a slicer for the user to choose the Map Style. How do I develop a slicer, or equvalent, to provide my user the flexibility to choose the Map Style? Thank you.

 

2 ACCEPTED SOLUTIONS
grazitti_sapna
Solution Supplier
Solution Supplier

 

In Power BI, there isn’t a built-in feature to dynamically change the map style via a slicer. However, you can implement a workaround by creating multiple map visuals, each with a different style, and then using a slicer to toggle visibility between them.

Here’s how to set it up:

  • Create Duplicate Map Visuals:
    • Copy and paste your map visual several times, each copy using a different style (Aerial, Dark, Light, Grayscale, Road).
    • Position them all in the same place on your report canvas, so they look like a single visual when displayed.

       

  • Create a Table for Style Selection:
    • Go to the “Model” view in Power BI and create a new table with a single column listing the map style options (Aerial, Dark, Light, Grayscale, Road).
    • For example, you can use the following DAX formula to create this table:

      DAX

      MapStyles = DATATABLE(
          "Style", STRING,
          {
              {"Aerial"},
              {"Dark"},
              {"Light"},
              {"Grayscale"},
              {"Road"}
          }
      )

       

  • Add a Slicer for Map Style:
    • Add a slicer visual to your report using the new MapStyles table, allowing the user to select the desired style.

       

  • Set Up Visual-Level Filters:
    • For each map visual, go to the “Visualizations” pane and apply a filter on the MapStyles selection to display only the map that matches the slicer choice.
    • For example, on the “Aerial” map visual, set a filter so it only shows when “Aerial” is selected in the slicer.

       

  • Hide Unselected Maps:
    • When setting up the filters, ensure that each map visual is only displayed based on the corresponding style selection in the slicer. This will effectively hide the other map visuals when a particular style is chosen.

       

By using this approach, your users can use the slicer to switch between different map styles without needing direct access to the map settings. This method requires more setup but provides the style flexibility you need.
If I have resolved your question, please consider marking my post as a solution🎉Thank you!.

View solution in original post

v-cgao-msft
Community Support
Community Support

Hi @Fidezuri1990 ,

 

As grazitti_sapna said, there is currently no way to switch map styles via the slicer. There is a workaround to create multiple maps stacked on top of each other and toggle their visibility via bookmarks:

vcgaomsft_0-1731461848935.png

I have attached a pbix file for your reference. Unfortunately bookmarks don't inherit the zoom from the last map, so if you have any suggestions and ideas to help make PBI better, feel free to submit them below:
Fabric Ideas

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

View solution in original post

3 REPLIES 3
Fidezuri1990
Helper I
Helper I

awesome, thank you so much! Both solutions work for me. 

v-cgao-msft
Community Support
Community Support

Hi @Fidezuri1990 ,

 

As grazitti_sapna said, there is currently no way to switch map styles via the slicer. There is a workaround to create multiple maps stacked on top of each other and toggle their visibility via bookmarks:

vcgaomsft_0-1731461848935.png

I have attached a pbix file for your reference. Unfortunately bookmarks don't inherit the zoom from the last map, so if you have any suggestions and ideas to help make PBI better, feel free to submit them below:
Fabric Ideas

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

grazitti_sapna
Solution Supplier
Solution Supplier

 

In Power BI, there isn’t a built-in feature to dynamically change the map style via a slicer. However, you can implement a workaround by creating multiple map visuals, each with a different style, and then using a slicer to toggle visibility between them.

Here’s how to set it up:

  • Create Duplicate Map Visuals:
    • Copy and paste your map visual several times, each copy using a different style (Aerial, Dark, Light, Grayscale, Road).
    • Position them all in the same place on your report canvas, so they look like a single visual when displayed.

       

  • Create a Table for Style Selection:
    • Go to the “Model” view in Power BI and create a new table with a single column listing the map style options (Aerial, Dark, Light, Grayscale, Road).
    • For example, you can use the following DAX formula to create this table:

      DAX

      MapStyles = DATATABLE(
          "Style", STRING,
          {
              {"Aerial"},
              {"Dark"},
              {"Light"},
              {"Grayscale"},
              {"Road"}
          }
      )

       

  • Add a Slicer for Map Style:
    • Add a slicer visual to your report using the new MapStyles table, allowing the user to select the desired style.

       

  • Set Up Visual-Level Filters:
    • For each map visual, go to the “Visualizations” pane and apply a filter on the MapStyles selection to display only the map that matches the slicer choice.
    • For example, on the “Aerial” map visual, set a filter so it only shows when “Aerial” is selected in the slicer.

       

  • Hide Unselected Maps:
    • When setting up the filters, ensure that each map visual is only displayed based on the corresponding style selection in the slicer. This will effectively hide the other map visuals when a particular style is chosen.

       

By using this approach, your users can use the slicer to switch between different map styles without needing direct access to the map settings. This method requires more setup but provides the style flexibility you need.
If I have resolved your question, please consider marking my post as a solution🎉Thank you!.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.