Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
benhumphrey
Contributor
Contributor

Interval Match Price to Item and Customer

Hi All,

What i am trying to do is get a price for a record where the sales order date is between two dates and where the Item Number and Customer Name match eg

SalesOrderTable:

Order NumberItemCustomerDate
11111Product 1Customer 110/10/2014

PriceList:

CustomerItemStart DateEnd DatePrice
Customer 1Product 101/10/201431/10/2014£5

I have been trying to use interval match with no avail. Please note that the price needs to be joined to the record.

Thanks in advance

Ben

1 Reply
anbu1984
Master III
Master III

PriceList:

Load *,Item&Customer As Key Inline [

Customer,Item,StartDate,EndDate,Price

Customer 1,Product 1,01/10/2014,31/10/2014,£5 ];

SalesOrderTable:

Load *,Item&Customer As Key Inline [

OrderNumber,Item,Customer,Date

11111,Product 1,Customer 1,10/10/2014 ];

Join

IntervalMatch (Date,Key) Load StartDate,EndDate,Key Resident PriceList;

Left Join(SalesOrderTable)

Load Key,Price Resident PriceList;

Drop tables PriceList;