Hi Folks,
I am trying to recreate a formula like this in alteryx. Any way to do this?
Checking if a concatenation of a string exists in a column, if yes then replace another column based on that.
=IF(COUNTIF($B:$B,$A3&"HELLO")>0, "X", "Y")
Hi @pratibhaprasad ,
You need the REGEX_CountMatches function:
REGEX_CountMatches([String], "Hello")
This will return a 1 or 0 representing yes or no. You can then wrap that in an IF statement to do what you want.
M.
I want to compare each cell with each value within a column, if the count is greater than 0 then the condition is fulfilled.
I attached a practical example of how you can accomplish the function you mentioned.
If you need help understanding it, let me know, providing a sample dataset would be helpful as well, but the example attached covers checking for a concatenation of one column with a different column being compared and then updating an existing column.
Pedro.
Hey @pratibhaprasad
Depending on how you want the output to be structured, there are a few ways to go about this.
It may be worth attaching a sample of your desired output - here's a guide that may help
If what you're trying to do is to find columns that have string concatenations in them; and break these down into separate columns - then you could use the text-to-columns tool; or Regex - it all depends on what input you have and how you want the output to look.