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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
danielact
Partner - Creator III
Partner - Creator III

Looking up a range in the script

I have 2 tables I'm loading in a script. One has a bunch of dates for individual contracts - let's call the field ContractDate. The other table has a bunch of date ranges. It would look like this:

DateRange     StartDate     EndDate

1                    1/1/2011          2/5/2011

2                    2/6/2011          3/11/2011

3                    3/12/2011          3/31/2011

and so on. The two tables are not linked by any common fields. I want to look up the date on the first table and get the corresponding Date Range that the date falls into.

Any ideas on how to do that?

1 Solution

Accepted Solutions
Not applicable

here you go, with just one final table.

View solution in original post

8 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You mean one to one mapping?(first record to first record)

Celambarasan

Not applicable

IntervalMatch()

danielact
Partner - Creator III
Partner - Creator III
Author

This looks like the right function, but I can't get it to work... can you help me out with the syntax?

The date field in Table 1 is called ContractDate. I already entered the layout of Table 2 above.

Not applicable

it could be: IntervalMatch ( ContractDate) Load StartDate, EndDate resident TableWithStartDateAndEndDateFields;

upload a reduced version of your QVW and I'll help you with it.

danielact
Partner - Creator III
Partner - Creator III
Author

Here you go

Not applicable

here you go, with just one final table.

danielact
Partner - Creator III
Partner - Creator III
Author

Thanks a lot!

Not applicable

Hi! i really want to see the syntex of the answer too.

but my Qlickview is personal edition so i cannot open this file,

can u please just copy  for me it in an answer???