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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
powerbigirl
Frequent Visitor

In which region is a hospital located if I have longitude and latitude for Regions and Hospitals

Hi,

 

I have 2 tables: Regions and Hospitals, and I have lon and lat columns for both of them.

 

I'm trying to add another column that shows in which region a specific hospital is located.

 

Any ideas?

7 REPLIES 7
Anonymous
Not applicable

@powerbigirl , if all you have is a pair of Lat/Long coordinates for both Hospitals and Regions, then you cannot find out which region a hospital is in, as this will require some GIS functionality. But for each hospital's Lat/Long coordinates you can find which region is it nearest to. This article explains how

coordinates - Power BI - Find closest location based on Lat/Lng - Stack Overflow

I'm sorry @Anonymous but it didn't work for me, it gives blanks

Anonymous
Not applicable

@powerbigirl Could you post some sample data of hospitals, regions, and their Lat/Long coordinates please?

Hi @Anonymous  Thank you, I also have the names of the hospitals if that can help.

I will check the link you provided to see if it works.

Hariharan_R
Solution Sage
Solution Sage

Hi,

I hope you have the relationship between the region and hospitals and it is connected with Region (1 side) and Hospitals (Many side). This is my guess. correct me if it is not like that. 

 

In Hospitals table create a calculated column using RELATED DAX function.

 

=RELATED('Region'[Lat])

Same for Lon column

 

Thanks

Hari

Thank you @Hariharan_R  I will try it and let you know

Hi @Hariharan_R  on what key can be the relationship between Hospiatls and Regions? 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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