QlikView IntervalMatch

In QlikView, the IntervalMatch function is used to match data to a set of intervals defined in a reference table. It is commonly used to assign data to categories or groups based on specific criteria. This powerful function called QlikView IntervalMatch is used to match different numerical values to numeric intervals. It is helpful in comparing how planned events and actual events played out.

The assembly lines of manufacturing facilities are one example of a situation where it is employed, as the belts are scheduled to operate at specific times and for specific durations. However, due to breakdowns and other factors, the real run may occur at various times.

For example, consider the following data set:

NameAge
John32
Jane25
Jack40

And a reference table with the following intervals:

Age RangeGroup
0 – 201
21 – 302
31 – 403
41 – 504

To assign each person in the data set to a group based on their age, you can use the IntervalMatch function as follows:

IntervalMatch(Age, Age Range) as Group

This will result in the following data set:

NameAgeGroup
John323
Jane252
Jack404

The IntervalMatch function takes two arguments: the field to be matched (in this case, Age) and the field containing the intervals (in this case, Age Range). It returns the value in the third column (Group) corresponding to the interval that the value in the first column (Age) falls into. If the value does not fall into any of the intervals, the function returns NULL.

You can also use the IntervalMatch function in a chart expression to group data by intervals. For example, you could create a bar chart showing the number of people in each age group by using the following expression:

=Count(IntervalMatch(Age, Age Range))

This would create a bar chart with four bars representing the four age groups defined in the reference table. 

Leave a Reply

Your email address will not be published. Required fields are marked *