Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Not applicable

Intervalmatch doesn't link all data as expected


I'm having some trouble using intervalmatch.

What I want to do:

Link the columns start(time) and end(time) (they're timestamps from a file) to a manually created column, let's call it MinuteID.

Expected result: To each MinuteID are all rows linked which have a start(time) <= MinuteID and an end(time) >= MinuteID. Which includes that one MinuteID can occur multiple times with different files (start/end combinations)

I wrote my code and in 95% it runs fine. But in 5% the data isn't linked by intervalmatch - it seems like all of that 5% have a start(time) where the minute is 00 (for example 14:00:35). But there are also cases where minute 00 is no problem.


start: 7.11.2014 10:00:00 //decimal: 41,950.416 666 666 672

end:  7.11.2014 10:00:12 //decimal: 41,950.416 805 555 556

Expected MinuteID linked to this: 7.11.2014 10:00:00 (and yes, it exists!) //decimal: 41,950.416 666 666 672

Does anyone guess how to solve this problem?

Thank you!

Kind regards


Tags (1)
3 Replies

Re: Intervalmatch doesn't link all data as expected

Please post sample data/app

Honored Contributor II

Re: Intervalmatch doesn't link all data as expected

Think that you need to truncate also the minutes in the logfile to full integers in order to have a match.

Not quite clear, how you wish to handle a log starting at 10:59 and ending at 11:01?

HTH Peter

Not applicable

Re: Intervalmatch doesn't link all data as expected

I found the problem. It was simple but hidden deep. There was just no data to match. If you format the MinuteID as DateTime everything was fine. Even if you format it as decimal - but you had to set the number of decimals after decimal point to 14 digits to see that the MinuteID was < than the start(time). Because of the fact that the duration (endtime - starttime) was less than one minute even the next MinuteId was not in range. So it didin't match.