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: 
siddharthsoam
Partner - Creator II
Partner - Creator II

How to use interval match when you have no fields in common

Hi All,

 

I have one Table as T1

LeadersEbitda %
A3
B5
C16
D28
E18

 

And the other as Table T2

Start Ebidta %End Ebidta %Category
0100-10 %
102010-20 %
2010020% +

 

I want to use Interval Match so that my category is made in T1 according to the logic in T2

Labels (1)
1 Solution

Accepted Solutions
marcus_malinow
Partner - Specialist III
Partner - Specialist III

This is fairly straightforward

T1:

LOAD

Leaders,

[Ebitda %]

FROM [...]

;

 

T2:

LOAD

[Start Ebidta %],

[End Ebidta %],

Category

FROM [...]

;

 

Link:

INTERVALMATCH([Ebitda %])

LOAD

[Start Ebidta %],

[End Ebidta %]

RESIDENT [T2]

;

//n.b. Link now contains [Ebitda %], and the related [Start Ebidta %], [End Ebidta %]

 

-------

At this point you can left join on to T1 from Link (then drop it), and from T2

 

Note that you will have issues if [Ebitda %] is 10% or 20% as this will match to more than one record in T2, so you may wish to reduce the Start or End Ebitda % values to avoid this

View solution in original post

1 Reply
marcus_malinow
Partner - Specialist III
Partner - Specialist III

This is fairly straightforward

T1:

LOAD

Leaders,

[Ebitda %]

FROM [...]

;

 

T2:

LOAD

[Start Ebidta %],

[End Ebidta %],

Category

FROM [...]

;

 

Link:

INTERVALMATCH([Ebitda %])

LOAD

[Start Ebidta %],

[End Ebidta %]

RESIDENT [T2]

;

//n.b. Link now contains [Ebitda %], and the related [Start Ebidta %], [End Ebidta %]

 

-------

At this point you can left join on to T1 from Link (then drop it), and from T2

 

Note that you will have issues if [Ebitda %] is 10% or 20% as this will match to more than one record in T2, so you may wish to reduce the Start or End Ebitda % values to avoid this