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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MK_QSL
MVP
MVP

Lookup between two tables

I have two tables and wants below result.

TypeCustomerSalesPoints
DEFENDCust13093.52250
DEFENDCust22725.05200
ATTACKCust32988.10100
ATTACKCust42620.85100
ATTACKCust53387.83150
ATTACKCust63864.72150
DEFENDCust74314.67300
DEFENDCust85703.84350
1 Solution

Accepted Solutions
swuehl
MVP
MVP

Here is an example how to do this using intervalmatch.

You'll need to prepare your Criteria table that it contains intervals for your points (start sales value, end sales value), you can do this either manually or doing some logic in the script (there are some sample files here in the forum that cope with that).

Then use the extended version of IntervalMatch Load prefix.

View solution in original post

9 Replies
Clever_Anjos
Employee
Employee

Best way is reload renaming Type to CriteriaType, so you have a key

christian77
Partner - Specialist
Partner - Specialist

Hi.

I've seen
your file. It's sort of complicated. It's impossible to make a join between sales and points since they are by intervals and they also belong to different Type.


So definitely you need to hit the help page and look for INTERVAL MATCH.


That's your solution.

christian77
Partner - Specialist
Partner - Specialist


I just did that and it does not work.

swuehl
MVP
MVP

You can use an intervalmatch in your load or advanced aggregation in your chart expression (assuming points are increasing for increasing sales).

For the chart expression, see attached.

MK_QSL
MVP
MVP
Author

How can we solve this case by interval match? if you can provide help....

christian77
Partner - Specialist
Partner - Specialist

Great! But only in this case cause each customer has only a type. Criteria is different by Type. Since there are only 2 criterias, you can doble that expresion and you'll have it.

Criteria is increasing but it is not proportional.

christian77
Partner - Specialist
Partner - Specialist

Open help menu and type interval match. This funcktion was intended for interval times. For example you can have a product with different discounts or prices along times.

The question is, what price to apply? Depends on time. What criteria to use. In this case depends on Type and on Sales. Take sales as your interval. Repeat it for each type or do compose one.

Syntax and its explanation are complicated also. That’s why is better if you
look at the help menu and see it by yourself.

swuehl
MVP
MVP

Here is an example how to do this using intervalmatch.

You'll need to prepare your Criteria table that it contains intervals for your points (start sales value, end sales value), you can do this either manually or doing some logic in the script (there are some sample files here in the forum that cope with that).

Then use the extended version of IntervalMatch Load prefix.

MK_QSL
MVP
MVP
Author

Thank you very much.. You make my day....!!