Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match two time intervals

Hi,

I need to match two time intervals like in the below example. I found this example but looks too complicated. Any idea how to get it easier? I've tried with master calendar but didn't get me to the needed results.

Intervals1:

StartDate1EndDate1
2015-05-012015-05-31

Intervals2:

StartDate2EndDate2
2015-04-152015-05-15

Results:

StartDate1EndDate1
2015-04-152015-04-30
2015-05-012015-05-15
2015-05-162015-05-31

Regards,

Przemek

12 Replies
Digvijay_Singh

As per logic start date and end date are picked up from different source Ids, It seems you need two Ids in one final record, one for start date source record and another for end date source record. Not sure though.

swuehl
MVP
MVP

I am bit late today.

There was a recent similar discussion on how to match intervals with IDs, have a look at

How to check whether certain record timestamps overlap...

It should demonstrate also how to interval match the subintervals back into the original intervals (so you get the information for each subinterval which original intervals contribute).

In the referenced sample QVW, there are two keys to consider, localilty and machine ID, so I think you should be able easily create a solution for your specific requirements.

Best,

Stefan

Not applicable
Author

Indeed, it'd look strange with 2015-02-31 🙂 Very many thanks!