cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie formula check

SOLVED
Highlighted
MaryB
Meteor

Newbie formula check

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
Highlighted
MaryB
Meteor

Newbie formula check

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

 

GarthM
Alteryx Alumni (Retired)

Re: Newbie formula check

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

 

Re: Newbie formula check

Do you have to have an "ELSE" part?

Ned
Alteryx Alumni (Retired)

Re: Newbie formula check

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