Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext 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
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?
@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
@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.
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
Hi @Hariharan_R on what key can be the relationship between Hospiatls and Regions?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 49 | |
| 44 | |
| 42 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 74 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |