Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

IF Statement


IF [Account Code] = "6410090" THEN [2018 E&P Adj]-[Current Balance] ELSE [2018 E&P Adj]+[Current Balance] ENDIF 


Please could you show me what's wrong with above IF formula.  I am getting "Invalid Type in Substraction Operator" Error.  I made sure all the components here are V_Wstring so not sure what's still wrong?  


Hi @Parthbhavsar 


If you want to subtract numbers, they must be numerical field types (Int, Double, etc.). Unless you wrap your field name in ToNumber(), you can't subtract string fields.


Hope this helps!


Thanks @BarnesK !  It worked