Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Condition in interval function

Hello Everyone,

I am trying to calculate the difference between 2 timestamps according to a condition.

All my timestamp Entries are linked to a field named Reference (6 digits number) and I am trying to exclude  a part of those Timestamps using this Reference field. What I want to eventually obtain would be  ( literally speaking) : 

(The minimum Timestamp excluding the one with Reference starting with 'XY') - ( The minimum TimeStamp)

I have tried the following expression but it does not seem to work:

Interval#(if(Reference <> 'XY***', Min(TMSTP)) - Min(TMSTP))

Do you people have any idea ?
Have a nice day


Tags (2)
5 Replies

Re: Condition in interval function

Interval(Min({<Reference = {'XY*'}>}TimeStamp)- Max(TimeStamp))

Interval(Min(if(Reference <> 'XY*', TMSTP)) - Min(TMSTP))

Re: Condition in interval function

Try this

interval(Min({<Reference-={'XY*'}>}TMSTP) -Min(TMSTP),'hh:mm:ss')

Make sure that your TMSTP field format is proper

Not applicable

Re: Condition in interval function

Thank you very much for you answer !
However, it seems that the wild characters ****** are not understood by the set analysis operator...
Is it normal ?


Re: Condition in interval function

provide sample application

Honored Contributor II

Re: Condition in interval function

Hi Alexandre-Bernard

Please provide a sample application to demonstrate your issue. Thnak you.