Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
matbelli
New 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

Re: time interval between 0 and 1

Create something like this

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

Re: time interval between 0 and 1

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
New Contributor

Re: time interval between 0 and 1

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

Re: time interval between 0 and 1

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
New Contributor

Re: time interval between 0 and 1

yes it's correct

Re: time interval between 0 and 1

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
New Contributor

Re: time interval between 0 and 1

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

Re: time interval between 0 and 1

Create something like this

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

Re: time interval between 0 and 1

You are the best! it works Smiley Wink