Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Newbie formula check

MaryB
7 - Meteor

I'm trying to write this formula but it errors out, not sure where the syntax is wrong.

IF IsNull([Project Name]) THEN [Target] = 0 END

 

3 REPLIES 3
GarthM
Alteryx Alumni (Retired)

Assuming you're trying to set the value of the 'Target' field to either 0 or 1 then:

 

 

IF IsNull([Project Name]) THEN 0 ELSE 1 ENDIF

Capture.PNG

 

MaryB
7 - Meteor

Do you have to have an "ELSE" part?

Ned
Alteryx Alumni (Retired)

Yes - the expression has to return a value.  If in the ELSE you don't want to change the value then that's easy, just return the original value:

 

IF IsNull([Project Name]) THEN 0 ELSE [Target] ENDIF
Labels
Top Solution Authors