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: 
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

Alex

5 Replies
MK_QSL
MVP
MVP

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

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

Kushal_Chawda

Try this

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

Make sure that your TMSTP field format is proper

Not applicable
Author

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 ?

MK_QSL
MVP
MVP

provide sample application

qlikviewwizard
Master II
Master II

Hi Alexandre-Bernard

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