Alteryx Designer Desktop Discussions

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

Solve for isNull across multiple columns at once

ewall
7 - Meteor

I have a number of columns with null values. Is there a simple way to replace all nulls in certain columns without doing a separate formula for each column? I do not want to create any new columns.

 

Example:

Column A / Column B / Column C - if any of the values in column A, B, or C are null, then replace with 0 in that original column of data

 

Thank you in advance!

9 REPLIES 9
Luke_C
17 - Castor

Hi @ewall 

 

You could use a data cleanse tool or a multi-field formula tool. I would recommend the latter, it would look something like this:

 

The key thing is to uncheck the box for copy output fields. 

 

Luke_C_0-1621979668645.png

 

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @ewall,

 

I'd go for the data cleansing approach as it's the simplest method:

 

Before:

Jonathan-Sherman_0-1621979696762.png

 

After:

Jonathan-Sherman_1-1621979723887.png

 

I've attached my workflow for you to download if needed!

 

Kind regards,
Jonathan

apathetichell
18 - Pollux

One addendum to what @Luke_C  said - if the columns are numeric - datacleanse does everything for you when you check "replace with 0 (numeric fields) - but we all like the tools we like.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Interesting @Luke_C, that we both went for the opposite approach!

Luke_C
17 - Castor

@Jonathan-Sherman @apathetichell Data cleanse is great too! Just have had some uses for the multi-field recently so there's some recency bias 😁

Jonathan-Sherman
15 - Aurora
15 - Aurora

Just to add a bit of background for @ewall...to decide on the approach i'd ask myself a question...

 

Do these columns (and will they always) contain only numeric values. If so then data cleansing works perfectly, if not then you'd need to go down the route of the multi-field formula tool as the data cleansing tool would convert null values to blanks in columns that have non-numeric data types

 

Kind regards,

Jonathan

ewall
7 - Meteor

@Jonathan-Sherman @Luke_C - thank you!! Both work, and the knowledge is much appreciated. I'll be using data cleansing for this one because they will always be numeric, but I have other flows where it looks like the multi-field formula tool will be the way to go.

 

Thank you both!!

Jonathan-Sherman
15 - Aurora
15 - Aurora

No problem at all, glad it helps!

aghftec
5 - Atom

Hi all, what should I do if I want to Backward/Forward fill all the null values in multiple columns?

Labels