Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

interval match

id1:

LOAD * INLINE [

ID,CreatedDate

  1,10-Jul-2013

  2,5-Jul-2013

  3,8-Jul-2013

  ];

 

id2:

LOAD * INLINE [

ID,StartDate,EndDate,Batchno

1,7-Jul-2013,7-Jul-2013,AOO11

1,8-Jul-2013,8-Jul-2013,B932A

1,9-Jul-2013,12-Jul-2013,S0o1g

];

 

IntervalMatch:

IntervalMatch (CreatedDate)

Load distinct StartDate as stdt, EndDate as enddt , Batchno as Batch_no resident id2;

I want to map createdate in id1 with startdate and enddate in id2 to retrive the bath no.

why it is not working?

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You have a field ID in both the event table (id1) and the interval table (id2). You will get a circular reference unless you rename one of the two. So do that first.

Then you should have a data model similar to the picture in the blog post when you are done.

HIC

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi

IntervalMatch:

IntervalMatch (CreatedDate)

Load distinct StartDate as stdt , EndDate as enddt resident  id2;

I have modified the interval matchj clause but it should come S0o1g batch no.But it is showing all three here

Regards

hic
Former Employee
Former Employee

You should not rename the fields in the intervalmatch load. Just load your first two tables, and then

IntervalMatch:

IntervalMatch (CreatedDate)

Load distinct StartDate, EndDate resident id2;

See more on http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch

HIC

Anonymous
Not applicable
Author

Thanks for your reply.In that case it could appear looping chain of synonym

id(id1)-id(id2)

and id2 with interval match table and id1 with interval match table

hic
Former Employee
Former Employee

You have a field ID in both the event table (id1) and the interval table (id2). You will get a circular reference unless you rename one of the two. So do that first.

Then you should have a data model similar to the picture in the blog post when you are done.

HIC