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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
RT3308
Helper I
Helper I

Help: Geo Location within Geo Area

Please help...

I've got two tables.  One table has the locations of certain buildings (lon and lat). Second table has geo areas (list of lon and lat). How do I determine which geo area the record in table 1 is within (or closest to)?

 

Appreciate the help. Thanks.

1 ACCEPTED SOLUTION
tharunkumarRTK
Super User
Super User

@RT3308 

In my opinion, you can convert your table into a GeoJson and feed it as insput to azure  maps or icon map visual.

https://learn.microsoft.com/en-us/azure/azure-maps/how-to-dataset-geojson

then you can plot your buildings (lat and long) on top of the area highlighted by the Geo Json. 

 

I understand that it wont give the exact distnace between the building and the locations in table 2. However the representation on the map will give good visual representation. If you want to calculate the distatance between two geo locations you. have to use Haversine formula

https://stackoverflow.com/questions/18883601/function-to-calculate-distance-between-two-coordinates#...

 

 

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @RT3308 ,
Thank you for the helpful responses @tharunkumarRTK  and @lbendlin !
The provided answer is accurate and may help you to resolve the query.Have you got an opportunity to review the information provided by community members?If it resolved, consider accepting their answer as solution.
Thank you.

Regards,
Pallavi.

tharunkumarRTK
Super User
Super User

@RT3308 

In my opinion, you can convert your table into a GeoJson and feed it as insput to azure  maps or icon map visual.

https://learn.microsoft.com/en-us/azure/azure-maps/how-to-dataset-geojson

then you can plot your buildings (lat and long) on top of the area highlighted by the Geo Json. 

 

I understand that it wont give the exact distnace between the building and the locations in table 2. However the representation on the map will give good visual representation. If you want to calculate the distatance between two geo locations you. have to use Haversine formula

https://stackoverflow.com/questions/18883601/function-to-calculate-distance-between-two-coordinates#...

 

 

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

 

lbendlin
Super User
Super User

That is an extremely complex topic, far beyond the capabilities of Power BI.

 

Geofencing – Determining Whether a Point Is Inside of a Polygon | Baeldung on Computer Science

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.