Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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 title is self explanatory, so I want to calculate the distance between 2 points that I select from the map.
The answer should show in a cardboard, and if more than 2 points are selected, the Cardboard should show (Blank).
What I have in hand:
1- Coordinates of all my points (Lat,Long).
2- The formula to calculate the distance between 2 points using coordinates.
The distance is the straight line between the two points, not a driving distance or anything special.
Question 2 (less important): it is possible to draw a circle with a certain radius around each point I select?
NOTE: ARCGIS or NORMAL Powerbi MAP allowed!
Solved! Go to Solution.
@Anonymous I think it could be done if you did a couple checks -
Distance Measure = IF( COUNTROWS(LatLongTable) = 2,
VAR _LatA = Min(Lat)
VAR _LongA = Min(Long)
VAR _LatB = Max(Lat)
VAR _LongB = Max(Long)
RETURN
[DistCalc]
)
I don't know how your table is formatted, but you will need to be more precise with the Min/max lat and long to make sure they actually correspond to each data point, and that you don't use lat from one and long from the other.
Drawing the circle of radius I have met someone who I think said they achieved this, but I don't recall how....
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Anonymous I think it could be done if you did a couple checks -
Distance Measure = IF( COUNTROWS(LatLongTable) = 2,
VAR _LatA = Min(Lat)
VAR _LongA = Min(Long)
VAR _LatB = Max(Lat)
VAR _LongB = Max(Long)
RETURN
[DistCalc]
)
I don't know how your table is formatted, but you will need to be more precise with the Min/max lat and long to make sure they actually correspond to each data point, and that you don't use lat from one and long from the other.
Drawing the circle of radius I have met someone who I think said they achieved this, but I don't recall how....
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Excellent! Thank you so much! The logic works, now i need to figure out how to make the calculation work. Thank you again!
@Anonymous , refer if these can help
https://community.powerbi.com/t5/Desktop/Distance-Calculation-in-Power-BI/td-p/206979
Indeed, I have seen those and that is why I said in my question that I know the formula. What I am asking for precisely is a way to do that by selecting those points on the map directly (if that is possible).
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |