Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
hansdevr
Contributor II

Intervalmatch, where interval = 0

Maybe a silly question, but I am sort of suspecting this issue to be the source of my problem..

Let's suppose that I have a reference date: 2016/06/19..

When start date and end date in my record are respectively 2016/06/15 and 2016/06/20, then IntervalMatch() sees this range as fitting with the reference date.

But what happens when start and end date are equal to the reference date?

I get the feeling that there is no IntervalMatch() found for this situation...

Thoughts anyone?

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Intervalmatch, where interval = 0

Date() will only reformat your value, keeping the underlying numeric representation.

Intervalmatch() will match based on the numeric values, so if your start and end dates are in fact timestamps, they won't match with your pure calendar date values from the master calendar.

AFAIR, we had a similar topic in one of your other threads.

Why don’t my dates work?

Get the Dates Right

10 Replies
hansdevr
Contributor II

Re: Intervalmatch, where interval = 0

Just to clarify: Peildatum means reference date; Datum start = start date and Datum einde = end date. As you can see, reference date 20-6-2016 is grayed out..

Not applicable

Re: Intervalmatch, where interval = 0

My understanding IntervalMatch include the boundary values (start and end dates) to match the reference dates.

I just wondering why the table box (first image) showing the association values between start, end and reference dates and reference date LB is greyed out.

hansdevr
Contributor II

Re: Intervalmatch, where interval = 0

Yes, I was under the impression that IntervalMatch() includes both start and end values as well... So - with you - I am wondering why the reference date is greyed out.. Is it because start end end values are identical?!?

Re: Intervalmatch, where interval = 0

Are you sure that your intervalmatch worked like descriped here: IntervalMatch and that you haven't excluded these Peildatum with other selections?

As an alternatively to intervalmatch especially if there are more key-fields is the use of a while-loop with iterno() which gives you more control and more flexibility by creating the intervals.

- Marcus

hansdevr
Contributor II

Re: Intervalmatch, where interval = 0

I did create a master calender table, using iterno().. And of course I already read that blog entry by Henric...

I added my script in .txt format...

MVP
MVP

Re: Intervalmatch, where interval = 0

Double check that your date fields are really showing dates (integers) and not timestamps (values with decimals) as numeric representation, e.g. don't use

date([Res. aanmaakdatum]) as [Aanmaakdatum]

in your first LOAD if you want to get a real date, but be safe using

date(Floor([Res. aanmaakdatum])) as [Aanmaakdatum]

Also double check the other date field transformations.

hansdevr
Contributor II

Re: Intervalmatch, where interval = 0

Thanks for your reply! date() is specified in my load script as having the standard format DD-MM-YYYY, so it should be OK. That date is BTW created to get a possibility to aggregate all created [Res. aanmaakdatum] (resolution up to 1/10000 second) to one single day per claim.

MVP
MVP

Re: Intervalmatch, where interval = 0

Date() will only reformat your value, keeping the underlying numeric representation.

Intervalmatch() will match based on the numeric values, so if your start and end dates are in fact timestamps, they won't match with your pure calendar date values from the master calendar.

AFAIR, we had a similar topic in one of your other threads.

Why don’t my dates work?

Get the Dates Right

hansdevr
Contributor II

Re: Intervalmatch, where interval = 0

Alright, you convinced me... Gonna try that and get back to you...

Community Browser