IF/Case Statement Issue

  • 0
  • 1
  • Question
  • Updated 4 weeks ago
  • Answered
I have the following fields
1.  SO TYPE (Multiple Choice)
2.  DATE FIELDS (Date)
3.  INITIATION DAYS (Formula Duration)
4.  INITIATION DAYS RANGES (Formula Duration)

My Initiation Days formula says the following and is working great!

If([SO Type]="R" or [SO Type]="LL", ([Portfolio Sent to USACE]-[Sent to QAE]),([Sent NTE Request]-[Date S/O Initiated]))

I am trying to write the formula for my Initiation Days Ranges formula with the following:

If([Initiation Days]<19,"0-18",
If([[Initiation Days]]>18 and [Initiation Days]<38,"19-37"),
If([Initiation Days]>37 and [Initiation Days]<57,"38-56"),
"More Than 56 Days")

But I am getting the following error:

'<' can't be applied on types duration, number

Can someone help me figure this out so that I can get this working!!!!!  It is absolutely driving me crazy.
Photo of Amber Polston

Amber Polston

  • 130 Points 100 badge 2x thumb

Posted 4 weeks ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,908 Points 50k badge 2x thumb
try this

[Initiation Days]<days(19),"0-18",
[Initiation Days]<days(38),"19-37",
[Initiation Days]<days(57),"38-56",
"More Than 56 Days")

Photo of Amber Polston

Amber Polston

  • 130 Points 100 badge 2x thumb
I changed the field type to formula text & the formula you provided worked perfect!  Thank you for your quick response.