The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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).
*I will note that I am using a treemap as my description filter on the map:
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()
)
User | Count |
---|---|
24 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
9 | |
9 |