True or False formula

I need help with this formula.

condition(equals(SHIPTO_CUSTOMER_NAME,[“WAL MART HVDC 7024”,“WAL MART HVDC 7055”,“WAL MART HVDC 6059”,“WAL MART HVDC 6047”,“WAL MART HVDC 7047”]),

TRUE
condition(equals(“LIVES_DROPS”,[“Live”]),condition(equals(Late_Arrival,[“On Time”]),1,1.5)),
FALSE
condition(equals(“LIVES_DROPS”,[“Drop”]),condition(equals(Late_Arrival,[“On Time”]),1.2,2)))

Example
if the customer WAL MART HVDC 7024 and it is a LIVE put 1 otherwise put 1.5
but if it is a DROP put 1.2 otherwise 2.

Hey Patrina - do you want the statement to be evaluated as the following?

If customer is WALMART & is a LIVE then 1
If customer is not WALMART & is a LIVE then 1.5
If customer is WALMART & is a DROP then 1.2
If customer is not WALMART & is a DROP then 2

Close. If it’s WALMART “LIVE” “On Time” 1
Or if LIVE late 1.5.

  1. to enter your condition loop the ShipCustomer has to be a WalMart, so I think that might be the issue, there isn’t a statement that identifies the ‘not a walmart’ situation; I’ve created 0.0 to address that.

  2. the False/Drop section of your loop re-evaluates the live/drop condition, I’m assuming that if the load is not Live then it must be a drop and removed that line.

condition(equals(SHIPTO_CUSTOMER_NAME,[“WAL MART HVDC 7024”,“WAL MART HVDC 7055”,“WAL MART HVDC 6059”,“WAL MART HVDC 6047”,“WAL MART HVDC 7047”]),
condition(equals(LIVES_DROPS,[“Live”]),
condition(equals(Late_Arrival,[“On Time”]), “1.0” , “1.5”),
condition(equals(Late_Arrival,[“On Time”]), “1.2”, “2.0”)), “0.0”)

Hi Patrina!

There are a few syntax issues that may also be giving you some issues:

  1. When doing equals syntax you must use a single variable and not a listing. Also, with the equals syntax, you would not wrap your variables in brackets. Your logic would change based off the below examples:

From this:
condition(equals(SHIPTO_CUSTOMER_NAME,[“WAL MART HVDC 7024”,“WAL MART HVDC 7055”,“WAL MART HVDC 6059”,“WAL MART HVDC 6047”,“WAL MART HVDC 7047”])

To this:
condition(in(SHIPTO_CUSTOMER_NAME,[“WAL MART HVDC 7024”,“WAL MART HVDC 7055”,“WAL MART HVDC 6059”,“WAL MART HVDC 6047”,“WAL MART HVDC 7047”])

  1. Since you are looking for specific WAL MART scenarios based on two additional fields, I would run something like the below. This gives you a little more flexibility and allows you to have more than two results:

condition(and(in(SHIPTO_CUSTOMER_NAME,["WAL MART HVDC 7024","WAL MART HVDC 7055","WAL MART HVDC 6059","WAL MART HVDC 6047","WAL MART HVDC 7047"]),equals(Late_Arrival,"On Time"),equals(LIVES_DROPS,"LIVE")),1,condition(and(in(SHIPTO_CUSTOMER_NAME,["WAL MART HVDC 7024","WAL MART HVDC 7055","WAL MART HVDC 6059","WAL MART HVDC 6047","WAL MART HVDC 7047"]),equals(Late_Arrival,"Late"),equals(LIVES_DROPS,"LIVE")),1.5,condition(and(in(SHIPTO_CUSTOMER_NAME,["WAL MART HVDC 7024","WAL MART HVDC 7055","WAL MART HVDC 6059","WAL MART HVDC 6047","WAL MART HVDC 7047"]),equals(Late_Arrival,"On Time"),equals(LIVES_DROPS,"DROP")),1.2,condition(and(in(SHIPTO_CUSTOMER_NAME,["WAL MART HVDC 7024","WAL MART HVDC 7055","WAL MART HVDC 6059","WAL MART HVDC 6047","WAL MART HVDC 7047"]),equals(Late_Arrival,"Late"),equals(LIVES_DROPS,"DROP")),2,0))))

I’m hoping this helps and gets you closer to what you are trying to achieve. Please feel free to reach out if you have any more questions!!