IF Formula not returning the Value

Good day Everyone,

I have the following formula that returns 3 different values , but unfortunately for a reason that i don’ know , only the second argument is returning a value.

Below Screenshot is from Appsheet, Is there anything that I am missing ? miswritten formula ?

Thanks in advance

1 Like

There may be some other issues, but by syntax of IFS() , the comma after “Delivered” is not required. (Highlighted in blue circle.)

IFS() - AppSheet Help

2 Likes

For some weird reasons , it is not working well .
according to your knowledge how would you translate this into an expression ?

IF the ATA cell is not blank and the ATD cell is Blank return “Loading” (Text)
IF the ATA cell is not Blank and the ATD cell is Not Blank , return “Departed” (Text°)

IF the ATA DEST Cell is not Blank , Return “Delivered” (Text)

Thanks in advance

Could you clarify , what you mean by it is not working well?

Could you update what type of columns [ATA], [ATD] and [ATA DEST] are?

It is likely that in your testing the second condition is always fulfilled and thus you are always getting the result as "“Departed”

1 Like

Hi Hussein,

In your first “AND” the ATD is missing the bracket and after the “Delivered” there is an extra comma. So this might work :
IFS(
AND(ISNOTBLANK([ATA]), ISBLANK([ATD]), “Loading”,
AND(ISNOTBLANK([ATA]), ISNOTBLANK([ATD]), “Departed”,
ISNOTBLANK([ATA DEST]). “Delivered”
)

Have a nice day

4 Likes

My logically understanding,

if not delivered, it may be either loading or departed.

if anything delivered, they were loaded and departed.

So the delivered part should be at topmost in expression, otherwise every “delivered” thing always returns “departed”. Try

IFS(
ISNOTBLANK([ATA DEST]), “Delivered”,
AND(ISNOTBLANK([ATA]), ISNOTBLANK([ATD])), “Departed”,
TRUE, “Loading”
)

3 Likes

Thank you all for your responses !

2 Likes

Thanks for your response, this is exactly what was happening
as every Delivered was showing delivered even if the ATA is not blank or is blank

My final expression:
IFS(
AND(ISNOTBLANK([ATA]), ISBLANK([ATD])),“Loading”,
AND(ISNOTBLANK([ATD]), ISBLANK([ATA DEST])),“Departed”,
AND(ISNOTBLANK([ATA DEST]),ISNOTBLANK([MAWB])),“Delivered”
)

Now its working great

thanks

2 Likes

You’re welcome.

For your info, my normal practice for IFS() is that the last condition’s always TRUE coz it’d process faster particularly when your tables become bigger & bigger (no need to evaluate more than TRUE).

Keep your expressions as short & simple as possible, your apps run faster.

4 Likes