Hi,
Is it possible to use a specific field your table as condition in an IF statement?
Say for example, I want to evaluate the Column 1 using the first row of Column 2 as condition?
Thanks in advance!
Solved! Go to Solution.
Could you please provide a sample of what you're trying to do?
One example of an input and a desired output.
Cheers,
I'm with @Thableaus . Not really sure what you're asking for. @BrandonB covered the case of using other fields in an expression as a condition. If you literally want to use a column as your condition you can do that as long as the column is a Boolean type. This is a silly example, but it shows a Boolean field (Equal_Flag) being used as a condition:
Technically, you could use an integer and possibly some other types as conditions (0 would be false) but generally that would be considered bad practice and confusing. The attached example shows Equal_Flag as a Boolean in one case and an integer in the other.
There's no way in Alteryx to reference a specific cell,i.e. Row 2 Cell 1 the way you can in Excel ($A$2). The various tools can only reference data on the current row, or in the case of the Multi row tool, current row +/- n.
The way would get around this to append the value that your want to compare to to all the rows like this
The lower filter and select target the row and column you want. This value is then appended to each of rows so the following formula tool can use it. The results look like this
Dan
I was going to ask for more detail but missed your comment above. @danilang nailed it. Please make sure to mark that as the solution if it is what you're looking for.
Hi danilang,
not exactly what I did but it gave a wonderful insight. thanks a lot.
ciao!