Forum Discussion

JackWoods's avatar
JackWoods
Qrew Trainee
3 years ago

Formula Text Field - Buckets based on Duration

Hey Community - I'm trying to bucket my projects based on the Penetration Days which is a duration field - this will help me establish how long the projects have been in the system. I keep getting an error  "Expecting Bool, Text"- Please advise - Thank you

If([Penetration Days]<Days(0),"Not Aged",
[Penetration Days]>Days(1),"0-3 M",
[Penetration Days]>Days(91),"4-6 M",
[Penetration Days]>Days(181),"7-9 M",
[Penetration Days]>Days(271),"10-12 M",
[Penetration Days]>Days(366),"13-18 M",
[Penetration Days]>Days(547),"19+ M",
)

------------------------------
Jack Woods | Low Code 4 Lyfe
------------------------------
  • Hi,
    use below code :
    If([Penetration Days]<Days(0),"Not Aged",
    [Penetration Days]>Days(1),"0-3 M",
    [Penetration Days]>Days(91),"4-6 M",
    [Penetration Days]>Days(181),"7-9 M",
    [Penetration Days]>Days(271),"10-12 M",
    [Penetration Days]>Days(366),"13-18 M",
    [Penetration Days]>Days(547),"19+ M"
    )

    You need to remove the comma after text in last line.

    ------------------------------
    Pranav Choudhary
    Quickbase Expert Builder Certified by Quickbase
    beniwalpranav@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      Here is corrected code. as the original code has a logic flaw.

      If([Penetration Days]<Days(0),"Not Aged",
      [Penetration Days]<=Days(90),"0-3 M",
      [Penetration Days]<=Days(180),"4-6 M",
      [Penetration Days]<=Days(270),"7-9 M",
      [Penetration Days]<=Days(365),"10-12 M",
      [Penetration Days]<=Days(547),"13-18 M",
      [Penetration Days]>Days(547),"19+ M"
      )

      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------