Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula

Hi2023
8 - Asteroid

Hi,

 

How would I write the formula for the below?

 

if fcoo '' and fcoo not in ('T', 'X', 'Z') then flag_lin = 0;

 

thanks

4 REPLIES 4
binu_acs
21 - Polaris

@Hi2023 are you checking if the field [fcoo] is blank in the first condition? 

 

 fcoo ''  ?

 

 

 

Hi2023
8 - Asteroid

YEs

binu_acs
21 - Polaris

@Hi2023 The condition is not correct. If the [fcoo] field is blank means there is no value for this field then no need second condition [fcoo] not in ('T',Z,X)

 

you can use the IsEmpty([fcoo]) to check whether the given field is blank or null

 

or you can use the OR condition

 

IF isEmpty([fcoo]) OR [fcoo] NOT IN ('T', 'X', 'Z') Then flag_in=0

Else

Null()

EndIF

Hi2023
8 - Asteroid

Yes, my mistake

 

it is part of a larger formula

 

if fcoo '' and fcoo not in ('T', 'X', 'Z') then flag_lin = 0;

if fcoo1 '' and fcoo1 not in ('T', 'X', 'Z') then flag_lin1 = 0;

if fcoo2 '' and fcoo2 not in ('T', 'X', 'Z') then flag_lin2 = 0;

if fcoo3 '' and fcoo3 not in ('T', 'X', 'Z') then flag_lin3 = 0;

if fcoo4 '' and fcoo4 not in ('T', 'X', 'Z') then flag_lin4 = 0;

if fcoo5 '' and fcoo5 not in ('T', 'X', 'Z') then flag_lin5 = 0;

 

if flag_lin  = 1 and flag_lin1 = 1 and flag_lin2 = 1 and flag_lin3 = 1 and flag_lin4 = 1 then output yrx
else output

 

********

 

 

coming from SAS to Alteryx conversion

Labels
Top Solution Authors