I am creating a formula that when the data matches a certain criteria, it adds a label to a new column.
I want to find all words in a certain column that begin with P and are followed by four digits. I have tried IF [column] = "P****" then "label" however this does not work but does not give me an error message. I am unsure of how Alteryx uses the asterisk/something else in order to show that I need four digits after the first letter.
Thank you.
Hi @sswift13 . You could try using the formula,
IF regex_match([column], 'P\d{4}.*')
then "label"
else Null()
endif
P
Hi Philip,
Thank you but this did not work for my project.
Hi @sswift13
Take a look at the workflow attached. It should either give you the solution or a good idea of how to get there.
Pedro.
Perhaps you could share some sample data (that's been sanitized if necessary)? I'm positive it can be amended to work for your use case.