Why my formula is not working?

In this example, I want to add the qty to any null avail date. However, if avail date is not null, then I want to do another comparison, if avail date is greater than today’s date and status is late, then add the qty otherwise null. This formula is giving me a syntax error

ifelse(isnull({avail date}, ‘null’),
{Qty}, ifelse({avail date}} > now() && {Status} = ‘late’,
{Qty},‘null’ ))

Maybe the position of the exclamation marks and then option?

ifelse(isnull({avail date}),{Qty},
ifelse({avail date} > now() && {Status} = ‘late’,
{Qty},‘null’ ))

Thank you so much for replying back, I still get the syntax error but this time on the second ifelse statement.

ifelse(isnull({Avail Date}),{Qty},

ifelse({Avail Date} > now() & {Status} = ‘late’,

{Qty},‘null’))

Please let me know

Try to use null instead of ‘null’

After several trials, I used AND instead of && and it worked; however, I am trying to do another one but giving me syntax error. In this one, I am checking if avail date = today’s date and Status is late, add qty otherwise null
ifelse(

dateDiff(‘d’, now(), {{Avail Date}}) = 0,

ifelse({{Status}} = ‘late’, {{Qty}}, null),

null

)

Appreciate your help:)

@nsaleh oh yeah. sometimes you are blind on one eye.

can you try
ifelse(dateDiff(‘d’, now(), {Avail Date}) = 0, ifelse({Status} = ‘late’, {Qty}, null),null )
Beside what is the error msg telling?

the error msg is to correct the syntax error in the first part .

ifelse(dateDiff(

Hi
could you try to use “DD” instead of “d”?

BG

I changed it to below formula but still testing to see if the results are good

ifelse(
{TW Supply Avail Date} <= now() AND {TW Status} = ‘late’,
{Order Qty},
null
)

@nsaleh -
Did the last formula resolve your issue? If so, please mark as solution. If not, please let us know how you need additional assistance. Thanks!

I tested the formula and the outcome, and it is working great!

Thanks so much for your help!