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
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
v-pagayam-msft
Community Support
Community Support

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
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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