Forum Discussion

cathoms's avatar
cathoms
Icon for Responsive Resident rankResponsive Resident
5 years ago
Solved

Using "and" in a conditional column

I'm making a conditional column and instead of using the "Conditional Column" tool I thought I would try coding it in a custom colum. Is it possible to use "if-and" statements? My code throws up an e...
  • CNENFRNL's avatar
    5 years ago

    cathoms 

    = if [#"Days btw CNCL & APPT"] >= 92 then "More than 3 months"
    else if [#"Days btw CNCL & APPT"] >= 61 then "2-3 months"
    else if [#"Days btw CNCL & APPT"] > 30 then "1-2 months"
    else if [#"Days btw CNCL & APPT"] > 14 then "3-4 weeks"
    else if [#"Days btw CNCL & APPT"] > 7 then "1-2 weeks"
    else if [#"Days btw CNCL & APPT"] > 2 then "Within 1 week"
    else if [#"Days btw CNCL & APPT"] > 1 then "Within 48 hrs"
    else "Within 24 hrs"