Dear All, I have one table that I need to compare each column with the rest of columns. For instance, column 1 compare with column 2,3 and 4 if there are only 4 columns. The values on these columns are string. If column 1 value identical to column 3 for instance then I will create new column and add value 1.
any idea on how to do it in Alterx ?
@binuacs
Thank you for your input, could you please explain to me more about the formula? What if I need to extend the comparison so that column 2 will also compare with column 3 in your example? Really appreciate your feedback
@qais1975 first you need to transpose the data with the key column RecordID (added a RecordID tool so that later this field can be used for join) and Column1 (since you want to compare column1 against the rest of the columns). In the output, you can see column1 data and the rest of the columns in the value field
Just add a formula tool then compare column1 against the rest of the column and update your result
once you have the new column cross-tab the ID column and the new field value, then join with the original input values
If you want to compare column 2 against column3 you need to adjust in the transpose tool similar to column1