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
Anonymous
Not applicable

Filtering Locations in Power BI Map by slider value

Hi,

I have two tables:

  1. Table of customer with locations (lat, long): list with over 7k entries, unique
  2. Table of customers (relationship with table 1 established) with specific geocoordinates to multiple addresses in their surrounding (within a 10km)
    • i.e. one customer (c1) has 3 addresses in the surrounding with: 2.3 km, 4.2 km and 9.2 km
    • i.e another customer (c2) has 2 adresses in the surrounding with: 8.7 km and 9.9 km

First desired goal: I want to show only those customers in a map (classic power bi map), by using a slider with a single value (representing upper bound of distance in km, build with what-if parameter), that have entries in the 2nd table with distance below target value. So, if slider value shows value "7.7" then only c1 should be visible in the map, and the map should be updated if one uses the slider to change value to "8.8" showing both c1 and c2.

 

Second desired goal: if first goal is feasible, is it possible to filter the map again by as second single value filter entering, i.e. value "2", showing then only those customers with at least two surrounding addresses in scope?

 

This is how the map looks like:

 

 

KG_0-1676548738828.png

 

What if have tried so far:

  • Slider value to control map: used DAXs:

 

 

Count_subs_2 = COUNTROWS(FILTER(Distances_7700_companies, [Avg_Distkm]<= 'Distance km Parameter'[Distance km Parameter Value]))​

 

Avg_Distkm = AVERAGE(Distances_7700_companies[DistanceKM])​

 

however, now reaction in the map

  • Controlling bubble size with DAX:
Map Point Size = IF( tbl_LongList_add_Info[Min_Dist] <= 'Distance km Parameter'[Distance km Parameter Value], 0.25, 0 )​

 

It seems, that this solution fails to the mass of data.

Alternative solution could be: if the map solution is not feasible, a table/matrix solution would be 2nd best.

 

Help is highly appreciated.

 

Sample data for the second table, where Source Id is customer data (also in table 1), and Substr ID represents the surrounding addresses, while the last column stands for distance:

Subst_Long            Subst_Lat                   Substr_ID                   Source ID             Source_Latitude    Source_Longitude  DistanceKM

16.3773688848.1825269R1162187AT004426148.2460700516.43934048.42194814
16.3535615148.1966924R2985067AT004426148.2460700516.43934048.393576641
16.3780732648.2063525W26421853AT004426148.2460700516.43934046.329140269
16.3897647948.257954W26644088AT004426148.2460700516.43934043.89902267
11.7630269349.6078135W29374760DE13166649.608277111.793029592.161280735
11.7911493249.6103766N10310779150DE13166649.608277111.793029590.269767102

 

2 REPLIES 2
lbendlin
Super User
Super User

 

with at least two surrounding addresses

 

what is a "surrounding address" ? You mean sellers?

 

Have you considered having a single table , and letting DAX do the distance calculation?

lbendlin_0-1676927311563.pnglbendlin_1-1676927325355.png

 

 

Anonymous
Not applicable

Suppose, the source Id corresponds to my client and the "Substr_Id" corresponds to my client's clients. That's why the lats and longs are in two different column each. Ideally, when I use the slider, only my clients with at least one address within slider value distance is to be shown. 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.