Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

search from a range

Hi

I have a lookup table like this. say crosstab:

CircleLowHighPF
AP110.5
AP11201
AP2199992
BR1300
BR3199991

Another table has following data:

CircleProductCount
APAAA40
APBBB101
BRAAA10

I need to put PF in table 2, based on looking at table2. count between Low and High value in table A.

Tried IntervalMatch. But as table A has Circle as a parameter, does not seem to work. (Maybe I don't know how to use).

Any inputs to above question will be appreciated.

4 Replies
sunny_talwar

May be this:

Table1:

LOAD Circle,

    Low,

    High,

    PF

FROM

[https://community.qlik.com/thread/206452]

(html, codepage is 1252, embedded labels, table is @1);

Table2:

LOAD Circle,

    Product,

    Count

FROM

[https://community.qlik.com/thread/206452]

(html, codepage is 1252, embedded labels, table is @2);

Left Join (Table1)

IntervalMatch (Count, Circle)

LOAD Low,

  High,

  Circle

Resident Table1;

Left Join (Table1)

LOAD *

Resident Table2;

DROP Table Table2;

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Use the Intervalmatch Function.

IntervalMatch

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks, but With this solution, more rows are coming. there should only be 3 rows

CircleProductCountPF
AP .5
AP 1
APAAA402
APBBB1012
BRAAA100
BR 1
sunny_talwar

You can use this in that case:

Table1:

LOAD Circle,

    Low,

    High,

    PF

FROM

[https://community.qlik.com/thread/206452]

(html, codepage is 1252, embedded labels, table is @1);

Table2:

LOAD Circle,

    Product,

    Count

FROM

[https://community.qlik.com/thread/206452]

(html, codepage is 1252, embedded labels, table is @2);

Left Join (Table1)

IntervalMatch (Count, Circle)

LOAD Low,

  High,

  Circle

Resident Table1;

Inner Join (Table1)

LOAD *

Resident Table2;

DROP Table Table2;


Capture.PNG