cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

New Member

Calculating distance between branches

Hi all!

I have a table with three columns: Branch_ID, Lat, Long and I want, when I select a branch (from the left table), to calculate the distance between this branch and all the other (in the right table).

Thank you!

1 ACCEPTED SOLUTION
Helper II

some of sites like below do this for you :

https://www.nhc.noaa.gov/gccalc.shtml

But for the formula You need Latitude and Longitude to calculate the distance between two locations with following formula:

=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon2-lon1))*6371 (6371 is Earth radius in km.)

this is useful too:

Helper II

some of sites like below do this for you :

https://www.nhc.noaa.gov/gccalc.shtml

But for the formula You need Latitude and Longitude to calculate the distance between two locations with following formula:

=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon2-lon1))*6371 (6371 is Earth radius in km.)

this is useful too:

Announcements

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors