HI All,
I would request you to help me nail a logic. I have got three fields, x, cond1 and cond 2. the value or metric in x needs to be checked against the condition present in cond1 and cond2 and based on whichever matches correctly, i would need a new column say y, consisting of the condition it satifies, i.e. either cond1 or cond2 or N/A. Please refer to the below mentioned input and desired output file.
Sample Input:
| x | cond1 | cond2 |
| 100 | >=99 | >=100 |
| 100 | <=100 | <=80 |
| 56 | >6 | >55 |
| 100$ | >=54$ | >=99$ |
| 80 | >81 | >100 |
Desired output
| x | cond1 | cond2 | y |
| 100 | >=99 | >=100 | cond2 |
| 100 | <=100 | <=80 | cond1 |
| 56% | >6% | >55% | cond2 |
| 100$ | >=54$ | >=99$ | cond2 |
| 80 | >81 | >100 | N/A |