Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

How do you move data from one field to another based on a criteria?

Dom
8 - Asteroid

Scenerio, I want to move all persons [ESSN]  to the [Insurance_ID] if there is any person with [Relation] = S.  Otherwise no data moves.

 

Thanks in advance!

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

Formula: 

 

select your insurance Id field and use the formula:

 

IF [relation] == "S" THEN [ESSN] 

ELSE ""

ENDIF

 

another version is:

 

IIF([relation]=="S",[ESSN],"")

 

Another:

 

SWITCH([relation],"","S",[ESSN])

 

thanks,

 

mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Dom
8 - Asteroid

I don't want the actual essn field in the output file. so, will the formula work without having this field in the Select tool? I don't want this field on the output file at all but I want the data to move for all peson if there is one person with Relation = S to InsuranceID field. 

jdunkerley79
ACE Emeritus
ACE Emeritus

You will need to have a select tool after the formula tool as the ESSN field needs to be there when evaluating the formula.

Labels
Top Solution Authors