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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
stathar0s
New Member

Calculating distance between branches

Hi all!

I need your help!

 

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

 

Picture1.png

 

Can anyone help me please!

 

Thank you!

1 ACCEPTED SOLUTION
ShirinArshadnia
Helper II
Helper II

hi @stathar0s 

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:

 

https://dataveld.com/2019/03/20/display-points-within-a-distance-radius-on-a-power-bi-map/

View solution in original post

1 REPLY 1
ShirinArshadnia
Helper II
Helper II

hi @stathar0s 

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:

 

https://dataveld.com/2019/03/20/display-points-within-a-distance-radius-on-a-power-bi-map/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.