I have DMS coordinates in three separate fields. I want to convert them to decimal coordinates.
Here is my expression. It successfully converts the DMS coordinates to a decimal value, But, my W longitudes are not outputting as a negative -- and Tableau needs them to be negative. What am I missing?
([Site|long_deg])+([Site|long_Min]/60)+([Site|long_Sec]/3600)*
(IF [Site|long_hemi]="W" THEN -1 ELSE 1
ENDIF)
Solved! Go to Solution.
I think it's simply an issue of needing an extra parentheses, plus, it actually changes the calculation as well because I think the -1 was being multiplied by the decimal degrees seconds only.
This works:
(([Site|long_deg])+([Site|long_Min]/60)+([Site|long_Sec]/3600))*
(IF [Site|long_hemi]="W" THEN -1 ELSE 1
ENDIF)