Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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...
  • Omega's avatar
    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)