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! It's time to submit your entry. Live now!
I am getting Errow when calculating distance between two cities.
I used this formula
In M through creating custom column with sample LAT format as 45.5105 (decimal degrees)
Lat1_Rad=([Latitude1]/180)*Number.PI Lon1_Rad=([Longitude1]/180)*Number.PI Lat2_Rad=([Latitude2]/180)*Number.PI Lon2_Rad=([Longitude2]/180)*Number.PI Distance_KM=Number.Acos(Number.Sin([Lat1_Rad]) * Number.Sin([Lat2_Rad]) + Number.Cos([Lat1_Rad]) * Number.Cos([Lat2_Rad]) * Number.Cos([Lon2_Rad]-[Lon1_Rad])) * 6371
Thanks for your attention on this, but i need in Miles and need to know how to use your formula in my calculation.
You can get the results in miles and then do a convertion multiplying the result by 1.6
Let me explain my use case.
This is my data
I need two filters as shown below
From City and Two City, When i select Dewitt and Bentonville, i need to know the distance between them.
I have two formula
Any help on this use case...
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 71 | |
| 45 | |
| 34 | |
| 28 | |
| 23 |
| User | Count |
|---|---|
| 143 | |
| 121 | |
| 59 | |
| 40 | |
| 33 |