Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

IF AND

HM
8 - Asteroid

Hi,

 

I'm trying to insert a formula which can lookup if it is null in 2 fields for the same row/record and if it is then output "No" else output "Yes" --> IIF(IsNull([Field 1]) AND (IsNull([Field 2]),"No","Yes")

 

The error I keep receive is "Malformed If statement".

 

Any help is appreciated - thanks.

14 REPLIES 14
brij
7 - Meteor

okay just tried case and that works

 

case
when "Billings$"<"BillingsCost$" then
"Billings$"-"BillingsCost$"
else 0
end

 

However IF has some bug in alteryx maybe .

Thanks for all the support so far.

BR

Brij

papalow
8 - Asteroid

Thanks for posting this, can you use && in a regular IF THEN ELSE ?

Matt_Sinker
7 - Meteor

Hi There,

 

Taking the same logic, how would I go about writing a formula with 3 conditions.

 

I am trying to replicate an excel formula which would read:

 

=IF(AND([X]="Y",[X]="N",[X]="N"),"Y","N")

 

Tried using the IF ELSEIF function but this isn't right, any thoughts?

Matt_Sinker
7 - Meteor

=IF(AND([X]="Y",[X1]="N",[X2]="N"),"Y","N") - would make more sense, apologies.

Matt_Sinker
7 - Meteor

Solved guys.

 

I didn't realise you could simply use AND in an IF THEN ELSE formula in Alteryx.

 

IF ([X]="Y" AND [X1]="N" AND [X2]="N") THEN "Y" ELSE "N" ENDIF - Worked.

 

 

Labels