This content has been marked as final.
Show 3 replies

1. Re: Degree Bearing Calculated from a Pair on Lat Longs
Ricard Kelly Jun 21, 2016 9:51 PM (in response to Walker Colt)(sorry, deleted earlier reply where I messed it up quite badly!)
You want the 'y' value as the first argument to the ATAN2 function. This returns radians so you want to convert to degrees. Then if you want a bearing you will want to return this normalised to 0..360 instead of 180..180. I've used your workbook's measure names in the below.
Bearing1
DEGREES(ATAN2(SIN([BH Longitude][Longitude])*COS([BH Latitude]),COS([Latitude])*SIN([BH Latitude])SIN([Latitude])*COS([BH Latitude])*COS([BH Longitude][Longitude])))
Bearing
IF [Bearing1] < 0 THEN
360 + [Bearing1]
ELSE
[Bearing1]
END

2. Re: Degree Bearing Calculated from a Pair on Lat Longs
lei.chen.0 Jun 21, 2016 10:15 PM (in response to Walker Colt)Hello Walker,
Please check out this link Calculating Distance  Tableau Software to see if it's helpful to you.
Regards.