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
Hey everyone,
I'm trying to show distance between two points on an ArcGIS map, but here's the thing, I have a table of deliveries and 4 different columns for coordinates (Latitude starting point, Longitude starting point, Latitude ending point, Longitude ending point). Is there a way to do it?
Solved! Go to Solution.
Hello @Henrique_Quint
Yes that is possible use below DAX code
Distance (km) =
VAR Lat1 = RADIANS([Latitude Start])
VAR Lon1 = RADIANS([Longitude Start])
VAR Lat2 = RADIANS([Latitude End])
VAR Lon2 = RADIANS([Longitude End])
VAR DLat = Lat2 - Lat1
VAR DLon = Lon2 - Lon1
VAR A =
POWER(SIN(DLat / 2), 2) +
COS(Lat1) * COS(Lat2) * POWER(SIN(DLon / 2), 2)
VAR C = 2 * ATAN2(SQRT(A), SQRT(1 - A))
VAR EarthRadius = 6371 -- Kilometers
RETURN
EarthRadius * C
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi @Henrique_Quint ,
Reshape the data in Power Query to create two rows per deliver
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
Hello @Henrique_Quint
Yes that is possible use below DAX code
Distance (km) =
VAR Lat1 = RADIANS([Latitude Start])
VAR Lon1 = RADIANS([Longitude Start])
VAR Lat2 = RADIANS([Latitude End])
VAR Lon2 = RADIANS([Longitude End])
VAR DLat = Lat2 - Lat1
VAR DLon = Lon2 - Lon1
VAR A =
POWER(SIN(DLat / 2), 2) +
COS(Lat1) * COS(Lat2) * POWER(SIN(DLon / 2), 2)
VAR C = 2 * ATAN2(SQRT(A), SQRT(1 - A))
VAR EarthRadius = 6371 -- Kilometers
RETURN
EarthRadius * C
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi, @pankajnamekar25 ! I've already done this measure, What I want to do is show the Start AND End on the map while also having 4 columns of coordinates...
Hi @Henrique_Quint ,
Reshape the data in Power Query to create two rows per deliver
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
Hi @Henrique_Quint ,
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!
Thank you!
If the information is helpful, please accept the answer by clicking the "Upvote" and "Accept Answer" on the post. If you are still facing any issue, please let us know in the comments. We are glad to help you.
We value your feedback, and it will help us to assist others who might have a similar query. Thank you for your contribution in enhancing Microsoft Fabric Community Forum.
Hi @Henrique_Quint ,
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!
Thank you!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |