I wanted to know that once I have plotted several locations on a map in Power BI, how can I calculate the distance between any two locations?
Go to Solution.
do you have LAT and LONG? If yes you can do it with math:
if not you need to custom call Bing Maps or Google Maps APIs for that
View solution in original post
You need Latitude and Longitude to calculate the distance between two locations with following formula:
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 as @cs_skit suggested.
I did a blog post on calculating the direct line distance between two points in DAX
Proud to be a Datanaut!
How do I use Google Maps API in Power BI?
This post is great but can anyone assist in calculating distance between two postcodes ?
Can I have the distances data exported out in Excel?
Fantastic blog, worked great for me
But how can we integrate it to Power bi?
But How to Integrate it into power bi?
Check out the on demand sessions that are available now!
Check out the Winners!
Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.