Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
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

Tags (2)
5 Replies
Highlighted
MVP
MVP

Re: Condition in interval function

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

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

Highlighted

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

Highlighted
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 ?

Highlighted
MVP
MVP

Re: Condition in interval function

provide sample application

Highlighted
qlikviewwizard
Honored Contributor II

Re: Condition in interval function

Hi Alexandre-Bernard

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