Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
sibrulotte
Contributor 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
Valued Contributor III

Re: Interval match for two ranges/criteria

Hi Simon,

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

Capture.PNG !

1 Reply
sinanozdemir
Valued Contributor III

Re: Interval match for two ranges/criteria

Hi Simon,

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

Capture.PNG !

Community Browser