Alteryx Designer Desktop Discussions

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

Formula for Replacing a value in a column

aliciadavoudpour
6 - Meteoroid

Hi! I have data in alteryx that looks like this:

 

BrandModel

Apechete

Chare
ApecheteChare
ApecheteCrux
ApecheteChare

 

I am trying to create a formula that replaces the value "Crux" in the model column to say "Chare" if brand="Apechete. 

 

I figure you use a formula that looks something like: IF[Brand]="Apechete" and [Model]="Crux" then REPLACE ....

 

can't figure out the replace part

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@aliciadavoudpour ,

 

so close. 

If [brand] = "Apechete" AND [model] = "Crux"

     THEN "Chare"

Else

[Model]
Endif

 

 use that in a formula tool and you should be good to go. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
aliciadavoudpour
6 - Meteoroid

Hey Mark, 

 

Type in those formula: If [brand] = "Apechete" and [model] = "Crux" then "Chare" else [model] Endif  

 

but, I am getting an error "the field "" is not contained in the record. (Expression #1)

 

updated: it worked thank you!!

AngelosPachis
16 - Nebula

Hi @aliciadavoudpour ,

 

That error is probably because you have not selected a name for the column you want to create or that name is not valid. Could you please make sure that you have filled in a name in the box just above the expression, when you are prompted to "Select a column"? 

 

Thanks,

 

Angelos

joshuaburkhow
ACE Emeritus
ACE Emeritus

@aliciadavoudpour 

 

What @AngelosPachis is pointing out here is this: 

joshuaburkhow_0-1607278054181.png

You need to update this by selecting a field or creating one 🙂 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Labels