Hello Team
Here is the below table and I wanted to have a column(Resultcolumn) based on this criteria
High is D + 1year, Medium is D+3year and Low is D+1 year
The different scenarios are
1.So when Categ1 is High & Categ2 is Null - I want date as date plus one year
2. Low & Null --> date plus five years
3. Medium & Null --> date plus three years
If anything other than NULL in Categ2, it should take categ2 into account
Can it be done without nested if? Wanted to know. Kindly help
Category1 | Category2 | Date | Resultcolumn |
High | Null | 30-07-2020 | 30-07-2021 |
High | Low | 29-07-2020 | 30-07-2025 |
Null | High | 20-07-2019 | 20-07-2020 |
Medium | High | 10-07-2015 | 10-07-2016 |
Low | Medium | 22-09-2018 | 22-09-2021 |
Low | High | 11-05-2018 | 11-05-2019 |
Null | Null | 11-05-2018 | 11-05-2018 |
Solved! Go to Solution.
hi @bala14_07 ,
you can split up the nested if statement into individual if statements... is this what you were looking for?
Hello Patel
Thanks a lot for this. Is it possible to do with Switch statement?
the switch function does one single comparison. i think the best option for this would be to do if statements
Hello Abhilash
Thanks a lot for you solution. This was the only solution I could think of as well. Really helpful abhilash