BAQ Calculated Field

Hello,
I’m trying to add a calculated field and failing on creating a statement that works so far. We use reliable production lead times based on JobAsmbl.TLEProdHours. For example, if Est Prod hours are between 0-2.4 hrs, our RPLT is 3 Days… if Est Prod hours are >= 2.4 and < 5.1 our RPLT is 6 Days. Can anyone help with a possible statement?

Are you looking for something like this?

CASE
  WHEN JobAsmbl.TLEProdHours > 0 and JobAsmbl.TLEProdHours < 2.4
    THEN 3
  WHEN JobAsmbl.TLEProdHours >= 2.4 and JobAsmbl.TLEProdHours < 5.1
    THEN 6
  ELSE 9
END

swap the ELSE 9 out with whatever you need or replace the 9 with null to get an empty field.
image

1 Like

Yes! So I figured out how to use the formula:

((ROUND(((ROUND((JobAsmbl.TLEProdHours /0.15/6),0))/3),0))*3)

But it won’t round up, and it doesn’t like the ROUNDUP function name.

Not sure if you are exactly looking for something like this but here it is for your reference.
cast(round(YourField, 2) as decimal(10, 2))