Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

smusayev
New Contributor

IF THEN DATE <

Hello,

I need help with the if then else question and using with time.

I need to create a new column in the load editor that looks whether  confirmation was done and if it was done within 4 hours (or 240 minutes) then create a column.


Example:

Column:                Confirm Status (string)            ElapsedTime (date)                        ConfirmWithin4hour

Row:                     Confirmed                   200 ( in minutes)                                         Yes

                            Confirmed                   10000 (in minutes)                                       No

My code is as follows 

Load *

  IF     ("Confirm Status" = 'Confirmed' AND "ElapsedTime" < 280 )   , 'Yes', 'No') AS ConfirmWithin4hour

The code loads however when I check against elapsed time in the app, it does show the correct numbers, as it grays out even numbers below 240 and show number above 240 as well.

I believe I am not using the < sign correctly when it comes to the date.

Please help, or if you have other work around please let me know.  Thank you

1 Solution

Accepted Solutions
MVP
MVP

Re: IF THEN DATE <

How about this:

If("Confirm Status" = 'Confirmed' and "ElapsedTime" < Interval#(280, 'mm'), 'Yes', 'No') as ConfirmWithin4hour

2 Replies
MVP
MVP

Re: IF THEN DATE <

How about this:

If("Confirm Status" = 'Confirmed' and "ElapsedTime" < Interval#(280, 'mm'), 'Yes', 'No') as ConfirmWithin4hour

smusayev
New Contributor

Re: IF THEN DATE <

Thank you so much. 

Community Browser