Formula for Replacing a value in a column
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi! I have data in alteryx that looks like this:
Brand | Model |
Apechete | Chare |
Apechete | Chare |
Apechete | Crux |
Apechete | Chare |
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
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What @AngelosPachis is pointing out here is this:
You need to update this by selecting a field or creating one 🙂
