Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
matbelli
Contributor
Contributor

time interval between 0 and 1

Hi, i have to check if Intervallo is between 0 and 1 hour, how can i do it? thanks

anag_nome_salaGiocoanag_nome_giornogiorno_partitaLunedì_openOrario_Fine_PartwinOrario_Fine_PartIntervallo
        -
AMERICABINGOlun24/09/2018_20109:00:0004:44:0015,6604:44:00.000000004:16:00
AMERICABINGOlun24/09/2018_20009:00:0004:38:0010,4404:38:00.000000004:22:00
AMERICABINGOlun24/09/2018_19909:00:0004:31:006,9604:31:00.000000004:29:00
AMERICABINGOlun24/09/2018_19809:00:0004:26:0010,4404:26:00.000000004:34:00
AMERICABINGOlun24/09/2018_19709:00:0004:20:0010,4404:20:00.000000004:40:00
AMERICABINGOlun24/09/2018_19609:00:0004:20:0020,8804:20:00.000000004:40:00
1 Solution

Accepted Solutions
sunny_talwar

Create something like this

If(Orario_Fine_Part >= Lunedì_open and Orario_Fine_Part <= Lunedì_open + MakeTime(1),
'Yay',
'Nay')

View solution in original post

8 Replies
sunny_talwar

What is the expected output based on the sample data you have provided? Also, are you doing this in the script or front end of the app?

matbelli
Contributor
Contributor
Author

I am doing this in front end, i have these 2 fields: Lunedì_open, Orario_Fine_Part and i have to check if Orario_Fine_Part is less than an hour from Lunedì_open. in other words i have to check if Orario_Fine_Part is between Lunedì_open and Lunedì_open+1 h.
thanks
sunny_talwar

In the above example rows, none of your rows pass the condition, right? For all of the rows, Orario_Fine_Part is NOT between Lunedì_open and Lunedì_open+1 h, correct?

matbelli
Contributor
Contributor
Author

yes it's correct
sunny_talwar

Okay, so what exactly do you want to see when the condition is NOT met or when it is met? Anther column where it says... Yay!! Condition Met. Nay!! it failed? Or something along those lines or you want to exclude those rows for your chart where the condition have not met? What exactly are you looking to do?

matbelli
Contributor
Contributor
Author

I would like to have the column with Yay if the condition is met and Nay if it's not
sunny_talwar

Create something like this

If(Orario_Fine_Part >= Lunedì_open and Orario_Fine_Part <= Lunedì_open + MakeTime(1),
'Yay',
'Nay')
matbelli
Contributor
Contributor
Author

You are the best! it works 😉