Forum Discussion
Balkrishnan
Helper II
7 years agoDistance between two Cities
I am getting Errow when calculating distance between two cities. I used this formula PI_D180 = PI()/180 Distance = ACOS(SIN(Distance[Latitude_1]*[PI_D180])*SIN(Distance[Latitude_2]*[PI_D180])+...
Balkrishnan
Helper II
7 years agoThanks for your attention on this, but i need in Miles and need to know how to use your formula in my calculation.
Anonymous
7 years agoNot applicable
You can get the results in miles and then do a convertion multiplying the result by 1.6
- Balkrishnan7 years ago
Helper II
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
PI_D180 = DIVIDE ( PI (), 180 )andDistance = ACOS(SIN(Distance[Latitude_1]*[PI_D180])*SIN(Distance[Latitude_2]*[PI_D180])+COS(Distance[Latitude_1]*[PI_D180])*COS(Distance[Latitude_2]*[PI_D180])*COS((Distance[Longitude_2]*[PI_D180])-(Distance[Longitude_1]*[PI_D180])))*3959But getting error...- Balkrishnan7 years ago
Helper II
Any help on this use case...