Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a load statement that populates a field called 'LateFlag' and want it to get filled with either on of 3 entries: "Not Applicable", "On-Time" and "Past-Due".
The conditions are as follows:
The code statement I am trying is:
If(Audits.Status = 'Issue Findings' or 'Acknowledge' or 'Released' or 'Closed', 'Not App', if(Audit Status = 'Pending', 'Scheduled' or 'Execute' AND Today() <= DateDue, 'On-Time', 'Past-Due))
as AuditLateFlag
Which, I know the syntax is incorrect and I'm trying to search for the correct way to write it.
Any help is very much appreciated. Thanks.
Jeff
Try this?
If([Audits.Status] = 'Issue Findings' or [Audits.Status] = 'Acknowledge' or [Audits.Status]= 'Released' or [Audits.Status] = 'Closed', 'Not App', if([Audit Status] = 'Pending', ([Audit Status] = 'Scheduled' or [Audit Status] = 'Execute') AND Today() <= DateDue, 'On-Time', 'Past-Due)) as AuditLateFlag
Make sure, With your date format of DateDue. Today() always gives 'DD-MM-YYYY'
Try this?
If([Audits.Status] = 'Issue Findings' or [Audits.Status] = 'Acknowledge' or [Audits.Status]= 'Released' or [Audits.Status] = 'Closed', 'Not App', if([Audit Status] = 'Pending', ([Audit Status] = 'Scheduled' or [Audit Status] = 'Execute') AND Today() <= DateDue, 'On-Time', 'Past-Due)) as AuditLateFlag
Make sure, With your date format of DateDue. Today() always gives 'DD-MM-YYYY'
Anil:
A bit late, but thanks for the solution. It worked great!
Jeff
Glad it worked