Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
hansdevr
Creator III
Creator III

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?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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

View solution in original post

10 Replies
hansdevr
Creator III
Creator III
Author

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

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
Creator III
Creator III
Author

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

marcus_sommer

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
Creator III
Creator III
Author

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

swuehl
MVP
MVP

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
Creator III
Creator III
Author

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.

swuehl
MVP
MVP

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
Creator III
Creator III
Author

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