Forum Discussion
Calculating (adding) distance between multiple locations using longitude and latitude
- 5 years ago
Hi Anonymous ,
You could use 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
Then sum up the distances by each person and divide 3 to get the result you need.
ps: 6371 is Earth radius in km.
You can achieve it via either Power Query or DAX method.
Or you can use Google Map API .
You could also check the reference below:
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Hi,
I'm unsure how to apply the above soluiton to my situation as follows:
1) I have a columns of; team names, long', lat' dates, unique identifier, address
2) Each team can do 3-4 jobs a day each with it's own long, lat
3) I need to show the total and average distance for team/s on any date or date ranges
Thanks in advance