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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: 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.
14 Replies
vikasmahajan
Author

Can you check now i create dummy excel and qvw Why 1cy4 is not getting product Class

Vikas

Thanks a Lot for reply

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

Hello

Many thanks for reply finally I resolved issue , there was rounding problem in 1CY4  in TO_SLAB 79.99 but qlikview shows 80

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

yes I was about to inform you of this

put in the slabs sheet instead of 70 to 79 , 70 to 79.99999 and so on

and it will work just fine

I can walk on water when it freezes
Not applicable

Hi Vikas,

IntervalMatch can definitely achieve what you want, while I want to implement it from the intervalmatch concept.

The IntervalMatch, the key to join or not is whether it's value is between the numeric range. Therefore, calculate the  FABS([RANGE_FROM] - [%Gr Margin]) + FABS([RANGE_TO] - [%Gr Margin]) can be used for conditional statements.

Attached is the implement, which is based on yours. While I prefer to use Ali's because of simplicity.

Alan

vikasmahajan
Author

Thanks Mr.Yang.

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.