Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
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