Discussion Board for collaboration on QlikView Scripting.
I am trying to calculate Records by comparing Today is Greater than (Less Than) a due date. this is what I have, but Im getting errors.
if(Today()) > [Calculated Eval Due], 'Overdue', 'OnTime' as EVAL_ONTIME;
Go to Solution.
if(Today() > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
Check your syntax:
should look like that, moved the ) from today to end of if statement
you to need to close your if statement:
if(Today()) > [Calculated Eval Due], 'Overdue', 'OnTime') as EVAL_ONTIME;
Can you check that [Calculated Eval Due] is a correctly formatted date?
The simplest way is to add the field to a listbox and see if the values are shown as dates or numbers, and whether the data is left or right justified.
If shown as a date, but right justified, the value is correctly held as a dual field and will match the data returned by today()
If shown as a date but left justified, then the value is held as text and you will need to use something like
Date(date#([Calculated Eval Due], 'DD/MM/YYYY'))
replacing DD/MM/YYYY with your actual date format to convert the data to a correct date value.
If shown as a number then date([Calculated Eval Due]) should convert the data to a correct date format.
I appreciate it, but it looks like the comma between [Calculated Eval Due] and 'Overdue' is the hangup.
I apologize for the newbie question but this is stumping me.
that did it,