Alteryx Designer Desktop Discussions

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

I'm trying to close an IF statement and I don't know what I'm doing wrong

shawkins566
5 - Atom

I'm trying to close an IF statement and I don't know what I'm doing wrong.

 

With ENDIF

With ENDIF.PNG

 

Without ENDIF

Without ENDIF.PNG

  

 

Can anyone help please?

6 REPLIES 6
DataNath
17 - Castor

Hey @shawkins566 as far as I can see, unless I’m overlooking something, the syntax looks fine here. Have you double checked whether or not your [Days before SLA] field is definitely numeric? May accidentally be a string in which case you’re trying to apply numeric operators to a string.

Luke_C
17 - Castor

Hi @shawkins566 

 

Check the data type of 'Days before SLA' to ensure it is a number and not a string. 

binuacs
20 - Arcturus

@shawkins566 Check your output data type and make sure it is string

mattnason1
9 - Comet

To follow the comments above.

 

If not a number just put ToNumber([Days before SLA]) instead of [Days before SLA] in each case of the statement.

 

Or you could also convert Days before SLA to a number ahead of the formula.

Emmanuel_G
13 - Pulsar

@shawkins566 ,

 

It doesn't work because you are comparing a number to a column that is not of type numeric.

 

To successfully do this, you can convert your column from string to number using the tonumber function according to the syntax ToNumber(Field) <= 28.

 

Alternatively, use a select tool and change the type to numeric before entering this formula tool.

shawkins566
5 - Atom

It's always something so simple! Thank you very much, I was losing my mind!

Labels