community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Expression to Evaluate NULL Conditions

Meteoroid

I joined to data sets by using JOIN and Union and the result provides me the desired results.  But one of the field/column called "Value" is empty and the output gives "Null" values.  I want to change those to 0 

 

So i used following statement in Formula tool

 

if IsNull([Value]) then 0 else [Value]

 

It gives me an error - "Malformed" If statement.  Please help.

 

New to Alteryx so any help would be appreciate.

Alteryx Certified Partner
Alteryx Certified Partner

Hi @maniruddha 

 

"if IsNull([Value]) then 0 else [Value] endif"

 

You need to add an "endif" at the end.

 

Cheers,

Alteryx Certified Partner
Alteryx Certified Partner

@maniruddha 

 

To replace Null values you could also use "Data Cleansing" tool.

 

datacleansing.PNG

 

You can have the option to replace null values with 0 (that's exatly what you're trying to do with your Formula Tool).

 

Cheers,

Meteoroid

Thank you so much!

Meteoroid

Thank you so much!  Both worked!

Labels