Forum Discussion
Anonymous
7 years agoNot applicable
Converting a Excel formula ino DAX
Hello all, I have a question; I use the following excel formula to calculate the difference in KM between 2 lon lat points: =IFERROR(ACOS(COS(RADIANS(90-E2)) *COS(RADIANS(90-I2)) +SIN(RADIANS(9...
- 7 years ago
Try:
Distance = IFERROR(ACOS(COS(RADIANS(90-[Lat1]))*COS(RADIANS(90-[lat2]))+SIN(RADIANS(90-[Lat1]))*SIN(RADIANS(90-[lat2]))*COS(RADIANS([Lon1]-[Lon2])))*6371,0)
Omega
Impactful Individual
7 years agoTry:
Distance = IFERROR(ACOS(COS(RADIANS(90-[Lat1]))*COS(RADIANS(90-[lat2]))+SIN(RADIANS(90-[Lat1]))*SIN(RADIANS(90-[lat2]))*COS(RADIANS([Lon1]-[Lon2])))*6371,0)
- Anonymous7 years agoNot applicable
Hello Omega,
Okay this was alot more straightforward than I expected but it works indeed.
Thanks
Best regards,
L.Meijdam