Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

how to use Interval Match for following requirement

Dear All

I have following fact table and slabs table

%COGS%Gr MarginCOGSPordCodeProdNameProduct CodeSls Amt
208035FDCEBT001CYCLOPAM TAB - SALE 10'S1CY4

173

this are fact table and following are range table I want to use interval match if  my [%Gr Margin ] field falling under (range fr To) then

respective product class should attached. ( for E.g  1CY4 will be getting Class -> A2 ( becase 1cy4 falls in (80-89) )

I have attached QVW file also.

Product_ClassRANGE_FROMRANGE_TO
A190999999999

A2

80

89

A37079
B46069
B55059
C14049
C23039
C32029
C41019
C509

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Partner - Master II

intervalMatch returns a table, name it temp or anything you like

I can walk on water when it freezes

View solution in original post

14 Replies
ali_hijazi
Partner - Master II
Partner - Master II

IntervalMatch([%Gr Margin])LOAD RANGE_FROM,RANGE_TO Resident DatesTable;



Join(DatesTable)

LOAD Distinct RANGE_FROM,RANGE_TO,[%Gr Margin] Resident temp;

drop Table temp;

//you can make an inner join or left join between DatesTable and Fact Table

I can walk on water when it freezes
vikasmahajan
Author

Thanks for reply

I have not use temp table ??? 

Can you please give me full script ?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
ali_hijazi
Partner - Master II
Partner - Master II

temp:

IntervalMatch([%Gr Margin])LOAD RANGE_FROM,RANGE_TO Resident DatesTable;



inner Join(DatesTable)

LOAD Distinct RANGE_FROM,RANGE_TO,[%Gr Margin] Resident temp;

drop Table temp;

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II

intervalMatch returns a table, name it temp or anything you like

I can walk on water when it freezes
vikasmahajan
Author

still I am not getting results ? Interval Match will works for NO ?

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
vikasmahajan
Author

Can u please create qvw and attach if possible .

Urgent help Please

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
ali_hijazi
Partner - Master II
Partner - Master II

I attached the document in my previous reply

check please

I binary-loaded data from the document you supplied and added the interval match script

I can walk on water when it freezes
Anonymous
Not applicable

Hi,

The following attachments might help you..

Go through it once.....

vikasmahajan
Author

Thanks

Please check 1cy4 cyclopam is not showing Class.

Vikas

Please check I have attached excel sheet of some records.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.