Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert DMS Coordinates to Decimal Coordinates w/ W Longitudes Negative

hellyars
13 - Pulsar

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)

 

 

 

1 REPLY 1
Dynamomo
11 - Bolide

@hellyars 

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)

 

Labels