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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IntervalMatch, Can we have two values similar?

I have the following. Can we use two similar values in IntervalMatch? (marked in RED COLOR). If not what is the alternate?

USERS:

     LOAD USER_ID,

     MONTH_CD,

      REWARDS,   

     ACTIVE

FROM

(ooxml, embedded labels)

where MONTH_CD = '201302';

RANGE:

load * inline

[

RANGE_L, RANGE_H, RANGE

0,0,    0

1,9,       1-9

10,49,     10-49

50,99,     50-99

100,199,   100-199

200,299,   200-299

300,499,   300-499

500,999,   500-999

1000,1999, 1000-1999

2000,2999, 2000-2999

3000,4999, 3000-4999

5000,9999, 5000-9999

10000,19999,10000-19999

20000,200000,20000-200000

];

Inner Join IntervalMatch(REWARDS) load

RANGE_L, RANGE_H

resident RANGE;

Join (USERS) LOAD * Resident RANGE;

drop Table RANGE;

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

Yes

See my example

Category:

LOAD * INLINE [

Desc, from-day, to-day

test,0, 0

First,1, 10

Second, 11, 20

Third, 21, 31

];

Emp:

LOAD * INLINE [

Name, day

T1, 0

A1, 1

A1, 5

A1, 2

A2, 7

A2, 15

A3, 25

];

Left join(Emp)

Intervalmatch(day)

LOAD [from-day], [to-day]

RESIDENT Category;

Left join (Emp)

LOAD * resident Category;

drop table Category;

View solution in original post

2 Replies
er_mohit
Master II
Master II

Yes

See my example

Category:

LOAD * INLINE [

Desc, from-day, to-day

test,0, 0

First,1, 10

Second, 11, 20

Third, 21, 31

];

Emp:

LOAD * INLINE [

Name, day

T1, 0

A1, 1

A1, 5

A1, 2

A2, 7

A2, 15

A3, 25

];

Left join(Emp)

Intervalmatch(day)

LOAD [from-day], [to-day]

RESIDENT Category;

Left join (Emp)

LOAD * resident Category;

drop table Category;

Not applicable
Author

Thanks sorry I was making mistake .. instead >=0 in expression I have decleared >0

Thank you