Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Replacing Null values in Column with string values

amitsingh88
8 - Asteroid

 

Hello,

 

I want to put Yes to 'Yes/No' column if either of 1st, 2nd or 3rd payer contains MCR or MEDCR otherwise No. I'm trying to do this with Filter tool but it's not working for me. Please suggest how I can achieve the result as I'm new to Alteryx.

 

Thanks,

Amit 

amitsingh88_0-1617985289243.png

 

5 REPLIES 5
apathetichell
18 - Pollux

Hi!

 

Try the formula tool. Filter tool separates records in your datastream.

 

So to filter out records with a null() you'd write:

isempty([1st payer])

 

And you don't even need the "IF" part...'

 

For formula make sure you are setting up your new column ("yes/no") as a string. Also - I personally have minimal experience using a "/" in a field name but could see it leading to problems...

AngelosPachis
16 - Nebula

Hi @amitsingh88 ,

 

You can do this with a formula tool, using the following expression

 

IF (Contains([1st Payer], "MCR") OR Contains([1st Payer], "MEDCR")) OR 
(Contains([2nd Payer], "MCR") OR Contains([2nd Payer], "MEDCR")) OR
(Contains([3rd Payer], "MCR") OR Contains([3rd Payer], "MEDCR")) THEN "Yes"
ELSE "No"
ENDIF

 

AngelosPachis_0-1617986320736.png

 

 

Regards,

 

Angelos

amitsingh88
8 - Asteroid

It is not working

 

amitsingh88_0-1617986609782.png

I want result like this, if any of the 1st, 2nd or 3rd payer contains MCR or MEDCR then there should be Yes in Yes/No column otherwise it will be No.

 

amitsingh88_1-1617986914136.png

 

 

Thanks

amitsingh88
8 - Asteroid

Thanks @AngelosPachis . That will work.😊

apathetichell
18 - Pollux

Hi,

 

Sorry if I wasn't clear - Formula requires IF/THEN/ELSE/ENDIF for conditional structures.

 

Filter doesn't. So for filter think of Then = the True anchor and Else = False anchor

 

hope that's clearer. So there's nothing wrong per se  with using formula with three different expressions - but to get the expression correct you'd need If/Then/Else/Endif for each expression.

Labels