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

Intervalmatch results issue

Hi

i load the data like this

PolicyProductSales:

LOAD Salespersonid,

     salesdate,

     salesamount

FROM

[..\14564.xlsx]

(ooxml, embedded labels, table is [policyproduct sales]);

Locations:

LOAD Salespersonid,

     salesperson,

     locations,

     startdate,

     enddate

FROM

[..\14564.xlsx]

(ooxml, embedded labels, table is offices);

Inner join (Locations)

IntervalMatch('salesdate') LOAD startdate,enddate Resident Locations;

This is my data

  

Salespersonidsalesdatesalesamount
1010/3/201510000
2020/03/201520000
3025/03/2015

30000

   

Salespersonidsalespersonlocationsstartdateenddate
10alondon1/3/201530/03/2015
20bmalasiya15/03/201522/03/2015
30cindia20/03/201528/03/2015
10amalasiya1/3/201520/03/2015
20bindia15/03/201523/03/2015
30clondon20/03/201529/03/2015

MY RESULT TABLE:

     

enddatelocationssalesamountsalespersonSalespersonidstartdate
20/03/2015malasiya10000a101/3/2015
22/03/2015malasiyab2015/03/2015
23/03/2015indiab2015/03/2015
28/03/2015indiac3020/03/2015
29/03/2015londonc3020/03/2015
30/03/2015london10000a101/3/2015
2000020
3000030

Is this correct result?

'a' located in two counties his sales only 10000 how it takes in locations sales and what about 'b'

can any help me

Thanks

Madhu

12 Replies
tamilarasu
Champion
Champion

HI,

Check the below script.

Data:

LOAD Salespersonid,

     salesdate,

     salesamount

FROM

[..\Desktop\Book1.xlsx]

(ooxml, embedded labels, table is Sheet1);

Locations:

LOAD Salespersonid,

     salesperson,

     locations,

     startdate,

     enddate

FROM

[..\Desktop\Book1.xlsx]

(ooxml, embedded labels, table is Sheet2);

Inner Join

INTERVALMATCH (salesdate, Salespersonid)

LOAD

startdate,

enddate,

Salespersonid

RESIDENT Locations;

Left join(Data)

Load * Resident Locations;

Drop Table Locations;

sasikanth
Master
Master

HI,

Check your location table once

     10, a, london, 1/3/2015, 30/03/2015

     10, a, malasiya, 1/3/2015, 20/03/2015

Can u tell me the meaning of this i.e. for ID =10, startdate is same for both the locations ?

because of this the salesdate fall in between these two , this might be the reason  

Not applicable
Author

Hi

yes  I give same dates for 2 locations  the result should show only  sales person 'a'

but what about 'b' and 'c' results i didn't understand it evaluate

Thanks

Madhu