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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sibrulotte
Creator III
Creator III

Interval match for two ranges/criteria

Hi,

I have a table that has job titles for a slew of people with dates where they started and ended:

LOAD * INLINE [

    NAME, Start, End, JOB_CODE

    Jeff, 2010-10-01, 2012-09-30, CHIEF

    Jeff, 2012-10-01, , BIG_CHIEF

    Garfield, 2011-10-01, 2013-09-30, BALLER

    Garfield, 2013-10-01, 2014-06-01, LOW_BALLER

];

I have Expense accounts and I want to know their job code when they made this expense:

LOAD * INLINE [

    NAME, DESCRIPTION, DATE, EXP_ID

    Jeff, Headress, 2012-06-01, 1

    Jeff, Funky shoes, 2014-01-01, 2

    Garfiled, Lasagna, 2011-11-30, 3

    Garfield, Pizza, 2013-11-30, 4

];

I would end up with something like:

    NAME, DESCRIPTION, DATE, EXP_ID, JOB_CODE

    Jeff, Headress, 2012-06-01, 1, CHIEF

    Jeff, Funky shoes, 2014-01-01, 2, BIG_CHIEF

    Garfiled, Lasagna, 2011-11-30, 3, BALLER

    Garfield, Pizza, 2013-11-30, 4, LOW_BALLER

];

Just an interval match doesn't work because I have more than one criteria. I was wondering if it was an issue of createit fit in an interval match function...

Any help here understanding the interval match possibilities?

1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

Hi Simon,

Sorry. My first attachment had a misspelling in the name. The below should work for you:

Capture.PNG !

View solution in original post

1 Reply
sinanozdemir
Specialist III
Specialist III

Hi Simon,

Sorry. My first attachment had a misspelling in the name. The below should work for you:

Capture.PNG !