Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am quite new in QlikView developing and I find a difficult to write an "If" statement. Now may statement is like
if(today() - "due_date" >='1' and today() - "due_date" <='30', "OpenAmount", '0') as [AR1-30]
But it has error. Can anyone suggest me how to write this sentence? I would like to check if today - due_date is in interval between 1 and 30 and if belongs to this I would like assign OpenAmount as [AR1-30]. Thank you in advance.
Have you tried:
if((today() - "due_date")>='1' and (today() - "due_date")<='30', "OpenAmount", '0') as [AR1-30]
Maybe it is because of the parenthesys missing and the expression wasn't ok
I hope it helps
There shouldn't be single quotes around the numbers.
Hi,
you can use Interval funciont:
if(interval(today()- due_date, 'd')>=1 and interval(today()- due_date, 'd')<=30, OpenAmount, 0) as Field
KR,
Elena
Hello I guess you try to find if a date is between day 1 and day 30, so try with:
if(day(today()) - due_date >=1 and day(today()) - due_date <=30, OpenAmount, 0) as [AR1-30]
Let me Know if this help you