Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I want to make multiple straight lines on map, each line has start point (lat and long) and end point (lat and long), I want to know the distance of each line between the start and end points.
My data table is similar like below:
AA1, start_lat, start_long, end_lat, end_long;
BB1, start_lat, start_long, end_lat, end_long;
CC1, start_lat, start_long, end_lat, end_long;
...
Any suggestion?
Thank you,
Paul
Solved! Go to Solution.
Hello paulfromhouston,
in power bi you could achieve it using Azure map visual
you need to make sure that your tenent admin has given acccess
if yes then , u need to format your data in following type:
AA1,start, lat, long;
AA1,end, lat, long;
then you can lat and long columns for visual and then u can add AA1 column or name column for "path id" for visual
if this helps, please mark as solution
Thank you, will test it later today and mark this as solution if it works for me. 🙂
Hello paulfromhouston,
in power bi you could achieve it using Azure map visual
you need to make sure that your tenent admin has given acccess
if yes then , u need to format your data in following type:
AA1,start, lat, long;
AA1,end, lat, long;
then you can lat and long columns for visual and then u can add AA1 column or name column for "path id" for visual
if this helps, please mark as solution
Thank you, will test it later today and mark this as solution if it works for me. 🙂
Hi @paulfromhouston For this use Pandas to load the data table with start and end coordinates, calculate distances using Geopy, and use Folium to plot the lines. For each row, use PolyLine in Folium to draw a straight line between the start and end points. Skip adding markers; focus only on drawing lines to represent connections. Save the map as an HTML file to view the lines and distances visually.
Do you have an example that I can follow? Thank you!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 122 | |
| 110 | |
| 83 | |
| 69 | |
| 68 |