Hi All,
Sorry I'm so new to Alteryx so all my questions are super basic!
Is there a way for me to apply a formula here to say if the size is big to rename the animal "big" animal
I've tried the below using an ampersand as though in excel and am getting a parse error - is it possible without appending a new column
output column: animal
if size= "big" then size & animal else animal
size | animal | name |
big | dog | boris |
small | cat | mark |
medium | monkey | gina |
small | cow | tracy |
medium | cat | helga |
small | monkey | benny |
big | cow | tim |
Help massively appreciated!
Thanks,
EM
Hey @EMPMUK - very close, you just need to amend the Syntax a little and use a + instead! If you use the following expression in a Formula tool you ought to get the expected output:
if [size]='big' then 'big '+[animal] else [animal] endif
if [size] = "big"
then
'big'+[animal]
else
[animal]
thanks so much for your quick answer - this is what I have in now but still getting parse error. Am I missing something 🤔
You need Endif at the end
oooh I realise this is in an appended column, is this what I'll need to do? no way to rename in the same colunm?
IF [size] = 'big' THEN [size] + " " + [animal] ELSE [name] ENDIF
Oh FGS! I'm still getting used to the change in formulae, thank you!
Just like and mark the solution if any of the replies helped.
Thanks.