Hi Team,
Please refer to the below sample data
| Fruit | Color |
| Banana | Blue |
| Banana | Amber |
| Banana | Red |
| Cherry | Amber |
| Cherry | Red |
| Mango | Red |
I want to create a new column based on the below conditions
If Color in ('Red','Amber','Green') THEN 'Green'
ELSEIF Color in ('Red','Amber') THEN 'Amber'
ELSEIF Color in ('Red') THEN 'Red'
ENDIF
Now the problem is condition fails in my use case since 'Cherry' satisifes 2 conditions
| Fruit | Color | Final Color |
| Banana | Blue | Green |
| Banana | Amber | Green |
| Banana | Red | Green |
| Cherry | Amber | Green |
| Cherry | Red | Green |
| Mango | Red | Red |
So if we notice 'Cherry' is colored Green but expected output is Amber.
Any thoughts how to get over this where we consider specific to the values in IF logic (Something like ONLY IF?)