Forum Discussion
einrikr
6 years agoFrequent Visitor
IF statement with multiple columns and logical tests
Hi all, I’m trying to make a column with values from several other columns: If Validation Result OET = “obligatory test” and Validation Date OET = blank, new column should say: “obligatory...
- 6 years ago
So something like the following?
Column = SWITCH( TRUE(), [Validation Result OET] = “obligatory test” && ISBLANK([Validation Date OET]), "obligatory test", [Days to DET Validation Deadline] < 0 && ISBLANK([Validation Date DET]), “Not Timely”, [Days to OET Validation Deadline] < 0 && ISBLANK([Validation Date OET]), “Not Timely”, [Days to DET Validation Deadline] <= 30 && ISBLANK([Validation Date DET]), “0-30”, [Days to OET Validation Deadline] <= 30 && ISBLANK([Validation Date OET]), “0-30”, [Days to DET Validation Deadline] > 30 && [Days to DET Validation Deadline] <= 60 && ISBLANK(Validation Date DET), "30-60", [Days to DET Validation Deadline] > 30 && [Days to DET Validation Deadline] <= 60 && ISBLANK([Validation Date OET]), “30-60”, “over 60” )Warning, probably a few syntax errors hiding in there but this should provide the concept.
Greg_Deckler
Community Champion
6 years agoSo something like the following?
Column =
SWITCH(
TRUE(),
[Validation Result OET] = “obligatory test” && ISBLANK([Validation Date OET]), "obligatory test",
[Days to DET Validation Deadline] < 0 && ISBLANK([Validation Date DET]), “Not Timely”,
[Days to OET Validation Deadline] < 0 && ISBLANK([Validation Date OET]), “Not Timely”,
[Days to DET Validation Deadline] <= 30 && ISBLANK([Validation Date DET]), “0-30”,
[Days to OET Validation Deadline] <= 30 && ISBLANK([Validation Date OET]), “0-30”,
[Days to DET Validation Deadline] > 30 && [Days to DET Validation Deadline] <= 60 && ISBLANK(Validation Date DET), "30-60",
[Days to DET Validation Deadline] > 30 && [Days to DET Validation Deadline] <= 60 && ISBLANK([Validation Date OET]), “30-60”,
“over 60”
)
Warning, probably a few syntax errors hiding in there but this should provide the concept.
einrikr
6 years agoFrequent Visitor
Thanks for your help!
This does exactly what I want it to do.
The solution did indeed give some syntax errors but they are easily fixed.
Thanks a lot!