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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

 

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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