Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

N/A to Null with Replace not working as intended

jwlam
8 - Asteroid

Hi everyone!

 

I'm having trouble with the Replace formula not giving me the output I would expect.

 

I want N/A values to be replaced with nothing so it reads as Null. When using "Replace("N/A", [Value], "")" the output is still N/A for some reason. I'm not sure where I've gone wrong.

 

jwlam_2-1654129072943.png

 

 

 

 

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @jwlam,

Think you have your formula parameters in the wrong order it should be Replace([Value],"N/A", ""):

IraWatt_0-1654129863590.png

This will replace the column values with blank. If you want to replace the values with NULL try this:

IraWatt_1-1654129951720.png

IF [Value]="N/A" THEN Null() ELSE [Value] ENDIF

Any questions or issues please ask :)
HTH!
Ira

 

Qiu
21 - Polaris
21 - Polaris

@jwlam 
@IraWatt gives very detailed comments and samples.

Lets refresh with the syntax 😂

Replace.PNG

jwlam
8 - Asteroid

Thanks for the explanation @Qiu. I totally had it backwards haha. 

jwlam
8 - Asteroid

Thanks @IraWatt. That totally worked!

IraWatt
17 - Castor
17 - Castor

Thanks @Qiu 😄 The formulas are always important for clarification ! Glad it worked for you @jwlam :D 

Labels