Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hobanwashburne
Creator
Creator

Help with Intervalmatch (I think)

I've put together some sample data similar to what I'm working on. In this example we ran a sales program where each participating customer received 10% off their purchases. Customer A participated from January thru May, customer B participated from August thru November.

The attached file contains two tables: One containing the invoices, the other containing the effective dates of the program for each customer. How do I apply a discount (or somehow identify) the invoices that fall within the date range for the given customer?

Thank you

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

Please go through the attached file

View solution in original post

3 Replies
aarkay29
Specialist
Specialist

Please go through the attached file

MK_QSL
MVP
MVP

Add below code after loading control table in your script.

Left Join

IntervalMatch (InvDate, Customer)

Load StartDate, EndDate, Customer Resident Control;

Left Join (Invoices_Temp02)

Load * Resident Control;

Drop Table Control;

sumitjadhav
Creator II
Creator II

hi Scott,

Refer the below example to clear the concept of interval match in qlik view,

Try the below method:

StudentMarks:

LOAD * INLINE [

    Minmarks, Maxmarks, Result

    10, 30, Fail

    35, 40, Pass

    45, 60, Average

    70, 80, Honour

];

Student_Details:

LOAD * INLINE [

   Marks, Name

    30, sam

    40, tom

    50, Don

    70, Bob

    80, Rob

    60, maddy

];

Interval:

IntervalMatch(Marks)

LOAD Minmarks,Maxmarks

Resident StudentMarks;

output:

intervalmatch.JPG