Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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...
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |