Alteryx Designer Desktop Discussions

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

Assigning null() to the final ELSE statement in and IF ELSEIF condition

Petersenk
7 - Meteor

Here is my statement:

 

IF ([Q3] = 1 and [Q5] = 1 and [Q6] = 1 and [Q2D] = 1 and [Q2F] = 1 and [Q12] = 1 and [Q13] = 1) and ([Q7] = 100) THEN 2
ELSEIF [Q3] in (4, 5) THEN 1
ELSEIF [Q4] = 1 THEN 1

--When I enter 'ELSE null()' I receive an error 'Invalid type in operator =='

ELSE null()
ENDIF

 

I want the value to be null if it is not assigned with the if then else logic.

I am creating a data type of int64 size (8) in the expression.

 

 

2 REPLIES 2
Federica_FF
11 - Bolide

Hi!

 

The error means that you are using the operator = to check/compare strings.

 

Are you sure Q3, Q5, Q6, et...... are numbers?

 

Use a select tool to convert the fields into number or put in quotes the formula if ([Q3]="1" and....)

Petersenk
7 - Meteor

Thank You!  That corrected my issue!

Labels