Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If Statement Help

Hey, I am trying to write an if statement to say if the status is "Done" before the "Target Date", it was delivered "On-Time"...if not, it is "Late".  How would I do this in an if statement?

5 Replies
oscar_ortiz
Partner - Specialist
Partner - Specialist

Tyler,

You can try something like this:

If ( StatusDate < TargetDate, 'On-Time', 'Late') as Status

Good luck!

Oscar

MarcoWedel

please post some sample data and your expected result.

thanks

regards

Marco

sasiparupudi1
Master III
Master III

If ( (Status='Done' and StatusDate < TargetDate), 'On-Time', 'Late') as Status

Hth

Sasi

oscar_ortiz
Partner - Specialist
Partner - Specialist

Tyler,

If anyone was helpful or if they answered your question would you please close the post.

Qlik Community Tip: Marking Replies as Correct or Helpful

Thanks

Oscar

anindya_manna
Creator II
Creator II

If ( (Status='Done' and StatusDate <= TargetDate), 'On-Time', 'Late') as Status

Just make sure that status date and target date are in same format.