Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I am working on a project where I need to get all the zip codes that is in a 25 mile radius of a selected zip code.
I have the lat and long for all the zip codes.
Can someone please help!
Thanks
hi, @Anonymous
You may try to use ArcGIS maps in Power BI
First thing you are going to have to do make use of the "Data Category" in the Modelling tab of the ribbon. Next you'll need to configure your Map visual to make use of the Zip code in the "Location" section of the visual.
Then Settings and formatting for ArcGIS maps and use Drive time feature.
Reference:https://docs.microsoft.com/en-us/power-bi/power-bi-visualization-arcgis
Best Regards,
Lin
I am not using a map.
I want to do this by using a formula to track all ZIP codes within a certain mile radius from the ZIP I enter.
For example. I have a search bar visual where I enter a ZIP, I then have a grid where it will display all ZIP within 25 miles or the ZIP I entered.
This is the formula I currently have which works but most of the ZIPS are a few miles off the ZIP entered in the search bar.
Miles Radius =
var Lat1 = MAX('To Zip'[Latitude])
var Lng1 = MAX('To Zip'[Longitude])
var Lat2 = MAX('From Zip'[Latitude])
var Lng2 = MAX('From Zip'[Longitude])
---- Algorithm here -----
VAR MilesCalc =ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Lng1-Lng2))) * 3959
RETURN MilesCalc
This formula works but the miles are off by a few from the entered ZIP.
I want the Miles from the to ZIP to be accureate and not a few miles off.
Please help!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |