Alteryx Designer Desktop Discussions

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

IF Statement

Palteryxgoal
5 - Atom

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?  

2 REPLIES 2
Kenda
16 - Nebula
16 - Nebula

Hi @Palteryxgoal 

 

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!

Palteryxgoal
5 - Atom

Thanks @BarnesK !  It worked

Labels