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: 
Not applicable

Lookup between FROM and TO dates

HI!

Im not an experienced QlikView developer so wonder if somebody out there can help.

I have one table with TICKETS and the fields TYPE and DATE

The other table DIM_TYPE containes TYPE, DESCRIPTION, STARTDATE and ENDDATE

I need to make an "lookup" from TICKETS to DIM_TYPE

Where

     TYPE = TYPE

     DATE BETWEEN STARTDATE and ENDDATE

I want to add the DESCRIPTION field to TICKETS or create a PRIMARYKEY in the tables so that i can link them together.

I guess this is possible but i dont know how.

Somebody that can help?

Rune

4 Replies
jonasheisterkam
Partner - Creator III
Partner - Creator III

Intervalmatch can help here.

MarcoWedel

Intervalmatch(Date, Type)

Load StartDate, EndDate, Type

Resident Dim_Type;

Not applicable
Author

Thank you for the tips!

It seems that this function should solve my problem but i can get to work.

I get som syntetic connections so the way i have written it so far is not ok.

Not applicable
Author

Hi again!

I have tried in another applikation and the script seems like this:

Pax_Rev_Details:

LOAD

     FLTNUM,

     FIA_FLTDATE,

     FIA_KEY,

     FIA_KEY.....

FROM

[..\QVD\MisData\MISDATA_2015.qvd]

(qvd);

FIA_Hierarki:

LOAD

     FIA_KEY,

     FIA_FLTDATEFROM,

     FIA_FLTDATETO,

     FIA_...........

Resident tmp_FIA_Hierarki;

DROP Table tmp_FIA_Hierarki;

FIA_IntMatch:

Intervalmatch(FIA_FLTDATE, FIA_KEY)

Load FIA_FLTDATEFROM, FIA_FLTDATETO, FIA_KEY

Resident FIA_Hierarki;

And the result is like this:

Can you see whats wrong?

Rune