Alteryx Designer Desktop Discussions

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

Can someone tell me why my formula is telling there is an operator error?

PhillSelby
5 - Atom

Hi all,

 

Hopefully a really quick one. I am trying to generate comments based off of comparing the value of column a and b. Both columns are in double data type, and output will be a vw string as it's text comment.

 

IF [Column A]<[Column B] then "Comment "+[Column B] else [Comment] endif

 

I am sure I am missing something simply but I've been staring at this build for so long im probably too close to it now

2 REPLIES 2
Deano478
12 - Quasar

@PhillSelby do you have a small dummy sample we can test on?

 

just going off assumptions you could try this:

IF [Column A] < [Column B] THEN "Comment " + ToString([Column B]) ELSE [Comment] ENDIF
Gaurav_Dhama_
8 - Asteroid

To attach "Comment" with Column B, you need to convert your Column B to string. The operator error you are getting is because you are joining a numeric filed using + with a string.

 

+ operator works differently for string and numeric fields hence the error. As mentioned in previous comment, that formula should fix your error.

Labels