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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jnguyen21
Helper I
Helper I

How to show all locations on map view when filtered

I have a list of Attractions and Restaurants I want to display on a map in PBI.  

 

Here is the table I am using. I want to be able to filter on an attraction, and it will show me the 1 attraction as well as all the restaurants in the bubble 

 

Location                   AddressType                                                                        Type             Size

Georgia Aquaium225 Baker St NW, Atlanta, GA 30313Attraction5000
Fox Theater660 Peachtree St NE, Atlanta, GA 30308Attraction5000
Museum of Ilusions264 19th St NW Suite 2200, Atlanta, GA 30363Attraction5000
Five Guys860 Peachtree St NE, Atlanta, GA 30308Restaurant1
Checkers120 Piedmont Ave NE Suite B Suite B, Atlanta, GA 30303Restaurant1
Moes171 Auburn Ave NE, Atlanta, GA 30303Restaurant1
Jimmy Johns400 W Peachtree St NW, Atlanta, GA 30308Restaurant1
Food Shop123 Luckie St NW UNIT 108, Atlanta, GA 30303Restaurant1

 

jnguyen21_0-1732312552299.pngjnguyen21_1-1732312565677.png

 

4 REPLIES 4
Thejeswar
Super User
Super User

Hi @jnguyen21 ,

Took @rohit1991 posted as starting point and improved it for your use case.

 

The Following are the Outcomes

1. When Attraction is selected in Type, the Location Slicer gets filtered to show only Attractions, but Map will show both Attractions and Restaurants. If a Location is filtered in the slicer, the map will show the Location and all the restaurants available

2. When Restaurant is selected in Type, the Location Slicer gets filtered to show only the Restaurants and the Map will also show only the restaurants. 

 

Note: Everytime you change the Type Slicer, Reset the Location Slicer for it to reflect the correct state

 

Added an additional table too, just to help you understand how the measure value changes for the selection.  PFB the screenshots associated.

 

Steps:

1. Create AllLocation table having Location and Type Columns

2. Create  Type table having only the Type as the column.

3. The Above two tables are joined using Type column. But are not joined with the main fact table. Refer screenshot below

Thejeswar_0-1754382856010.png

4. Created the below measure.

IsSelected = 
IF(SELECTEDVALUE('Type'[Type]) = "Attraction",
IF (
ISFILTERED(AllLocation[Location]),
IF (
SELECTEDVALUE(AllLocation[Location]) = SELECTEDVALUE('Table'[Location]),
"Selected",
IF(SELECTEDVALUE('Table'[Type]) = "Restaurant","Selected","Not Selected")
),
"Selected"
),
IF(SELECTEDVALUE('Table'[Type]) = "Attraction","Not Selected",IF(ISFILTERED(AllLocation[Location]),IF(SELECTEDVALUE(AllLocation[Location]) = SELECTEDVALUE('Table'[Location]), "Selected", "Not Selected"), "Selected")
))

 

5. Add Address to Location, Type to Legend and Size to BubbleSize in the map visual and Add the "IsSelected" measure as a visual filter to your map visual and Filter it to "Selected". Refer screenshot below

 

Thejeswar_1-1754382950604.png

Output:

1. When Attraction is selected in Type

Thejeswar_2-1754383085576.pngThejeswar_3-1754383112907.png

 

2. When Restaurant is selected in Type

Thejeswar_4-1754383136260.png

Thejeswar_5-1754384063969.png


Hope this helps ! If this solves your need, mark it as solution. Appreciate a Kudo !!

 

rohit1991
Super User
Super User

Hi @jnguyen21 


Could you please follow Steps to Implement
1. Create a base Locations table
This should include:
     a. Location
     b. Address
     c. Latitude & Longitude
     d. Type / Size (if needed)
(This table should include all possible locations not just filtered ones.)
2. Don't connect this table to any other table
Keep it unlinked (no relationships). This prevents slicers from removing data from the map visual.
3. Create a Slicer Table
Create a second table (e.g., Location Filter) with unique values for filtering (Location, Type, etc.). This will be used in slicers.
4. Create a Selection Measure
Use the following DAX measure to detect selection and highlight:

IsSelected =
IF (
ISFILTERED(LocationFilter[Location]),
IF (
SELECTEDVALUE(LocationFilter[Location]) = Locations[Location],
"Selected",
"Not Selected"
),
"Selected"
)

Use this Measure in the Map Visual
Place the Location field from the base Locations table on the map.
Use the IsSelected measure in Legend or Conditional Formatting to distinguish between "Selected" and "Not Selected".
The map will now always show all points, but only selected ones will be emphasized.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
rohit1991
Super User
Super User

Steps to Always Show All Locations:

  1. Load Your Data into Power BI: Import your table with Location, Type, and Size.

  2. Create a Map: Add a Map visual. Drag Location to Location, Type to Legend, and Size to **Size`.

  3. Create a DAX Measure:  Go to Modeling > New Measure and add this: AlwaysShow = 1 This creates a simple flag that always equals 1.

  4. Apply the Measure to the Map: Drag AlwaysShow to the Filters on this visual pane. Set the filter to is 1. This ensures all rows are always shown, regardless of slicer selections.

  5. Optional: Add a Slicer for Filtering: Add a slicer with Location or Type. The map will keep showing all locations while still highlighting the filtered results.

Now, the map will always display all locations, but filtered selections will be highlighted!


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

I am not sure I follow. Even though I put always show, it still wants to filter down when I select Location

jnguyen21_0-1732544636590.png

 

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