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

Expression to Evaluate NULL Conditions

maniruddha
7 - Meteor

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.

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @maniruddha 

 

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

 

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

 

Cheers,

Thableaus
17 - Castor
17 - Castor

@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,

maniruddha
7 - Meteor

Thank you so much!

maniruddha
7 - Meteor

Thank you so much!  Both worked!

Labels
Top Solution Authors