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
SJ1000
Regular Visitor

Layered Filtering in Power BI

Hello

 

Wanted to get some help with filtering on a Power BI map. 

 

The map has a location filter, radius filter and locations description filter. 

 

Data looks like this: 

 

Location|   Description|  Lat |  Long

1                        A

2                        A

3                        A

4                        B

5                        B

6                        B

7                        C

8                        C

9                        C

 

When a location is selcted, a red bubble is placed on the map based on the radius being 0 (starting point) and everything else is assigned a color based on the descripiton. The radius filter is used to find locations around the starting point (selected location) using the Lat and Long in the data.

 

My issue is when I select the location on the location filter (center point of radius/red dot on map) and then select a descripition the red dot disappears if the description is different.

 

For example - if I select location 1 (starting point/red bubble) and want to see all locations that have a description of B in a 5 mile radius from location 1. Once I select B on the description filter, the red bubble/radius starting point assigned to location 1 on my map disappears. How can I prevent this from happening? 

 

Here is the Dax formula I am using to color code the map based on the locations descriptions and location selected (starting point).

 

 

SELECTED STORE COLOR =
IF(HASONEFILTER('MAP DATA ' [Location ]),
SWITCH(TRUE(),
[Dis]=0, "#F60707",
var A = IF(SELECTEDVALUE('MAP DATA'[Description]) = "A",TRUE,FALSE)
var B = IF(SELECTEDVALUE('MAP DATA'[Description]) = "B",TRUE,FALSE)
var C = IF(SELECTEDVALUE('MAP DATA'[Description]) = "C",TRUE,FALSE)

RETURN
SWITCH(TRUE(),
A,"#3FF748",
B,"#8275FB",
B,"#FFFB15")
))

 

 

*I will note that I am using a treemap as my description filter on the map:

SJ1000_0-1701887927388.png

 

 

1 REPLY 1
Akash_Varuna
Super User
Super User

I think by assinging a variable for the distance making it 0 will do the trick for the red buble try this please

SELECTED STORE COLOR =

VAR SelectedLocation = SELECTEDVALUE('MAP DATA'[Location])

VAR SelectedDescription = SELECTEDVALUE('MAP DATA'[Description])

VAR Distance = [Dis]

 

RETURN

IF(

HASONEFILTER('MAP DATA'[Location]),

SWITCH(

TRUE(),

Distance = 0, "#F60707", -- Red for the selected starting point

SelectedDescription = "A", "#3FF748", -- Green for "A"

SelectedDescription = "B", "#8275FB", -- Blue for "B"

SelectedDescription = "C", "#FFFB15", -- Yellow for "C"

BLANK()

),

BLANK()

)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.