Intervalmatch Function in Qlikview

In QlikView, IntervalMatch Function is used for matching the values present in the two tables. This function helps study the actions exactly happening against the scheduled actions.

If you would like to become a Qlik Sense Certified professional, then visit Mindmajix - A Global online training platform: " Qlik Sense Certification Training Course ". This course will help you to achieve excellence in this domain.

In this blog, we will discuss the following topics:

What is IntervalMatch?

QlikView IntervalMatch is a function used for comparing diverse values with numeric periods. It is also helpful in studying how the proceedings happened against the scheduled proceedings. This function is useful in the meeting lines of the production house, where a certain duration and time are scheduled for the running of belts. Though, the real-time can occur at distinct points due to different problems like breakdown, etc. The IntervalMatch Function is used with Inline, LOAD, and SQL Select statements.

[ Related Article: Synthetic keys in QlikView ]

Syntax of IntervalMatch Function

IntervalMatch(match_field) (selectstatement | loadstatement )

The “IntervalMatch” prefix is inserted before a “SELECT” or “LOAD’ statement. 

Arguments:

  1. Match field: This argument includes the distinct values that are to be matched with the intervals.
  2. Key field: This argument includes the supplemental attributes that are matched in the translation.
  3. load statement or select statement: This argument includes distinct data points and supplemental keys that should be loaded into the QlikView through the “IntervalMatch” Prefix.

 

Frequently Asked QlikView Interview Questions & Answers

Advantages

1. Time Preserving

IntervalMatch Preserves the time of the QlikView application as joins are not utilized with it.

2. Preserves Memory:

It preserves the QlikView Application Memory as it evades loading all the feasible numerical values towards a fact table.

MindMajix YouTube Channel

3. It evades the concepts of case statements.

Example of IntervalMatch Function

Let us consider three tasks that need to be executed in the CPU and that tasks have starting time and ending time. We name those tasks as Task1, Task2, Task3. Now we will analyze the real starting time of those tasks, and for that, we will take two tables:

#Data Set for CpuTasks

Start_Time End_TimeTaskNo
01:005:00  Task1
03:00  04:40 Task2
03:45   11:00     Task3

 #Data Set for events that happened

Actual_TimeTask
02:00Start Task1
02:45Stop Task2
03:20Restart Task1
04:15Stop Task1
02:30Start Task3
03:10Stop Task3
04:45Start Task2
05:30Start   Task2

The above code is written in the script editor in the following way:

CpuTasks:

LOAD * In_Line {

Start_Time, End_Time, TaskNo

01:00           05:00          Task1

03:00           04:40           Task2

 03:45        11:00             Task3 };

 Tasks;

LOAD * In_Line  {

Actual_Time,  Task

02:00,               Start Task1

02:45                 Stop Task1

03:20                 Restart Task1

04:15                 Stop Task1

02:30                  Start Task3

03:10                  Stop Task3

04:45                  Start Task2

05:30                  Stop Task2  };

IntervalMatch(Actual_Time) LOAD Start_Time, End_Time

resident CpuTasks;

After developing the script, we will create a Table Box Sheet object to display the data created by the IntervalMatch Function.

The data created by the IntervalMatch Function will be displayed as follows:

Start_TimeEnd_TimeActual_TimeTask
01:0005:0002:00Start Task1
01:0005:0002:30Start Task3
01:0005:0002:45Stop Task1
01:0005:0003:10Stop Task3
01:0005:0003:20Restart Task1
01:0005:0004:15Stop Task1
01:0005:0004:45Start Task2
03:0004:4003:10Stop Task3
03:0004:4003:20Restart Task1
03:0004:4004:15Stop Task1
03:4511:0004:15Stop Task1
03:4511:0004:45Start Task2
03:4511:0005:30Stop Task2

[ Related Article: Star schema and Snowflake schema in QlikView ]

Implementing IntervalMatch Function in QlikView Application

Steps for Implementing IntervalMatch Function

1. First we will open the QlikView Application

QlikView IntervalMatch Function - Implementing IntervalMatch Function in QlikView Application

2. Now we will open the script editor

QlikView IntervalMatch Function-Implementing IntervalMatch Function in QlikView Application

3. After opening the script editor, we will develop a script using IntervalMatch Function

QlikView IntervalMatch Function - Implementing IntervalMatch Function in QlikView Application

4. After developing the script, we will create a Table Box Sheet Object in the sheet properties window.

 QlikView IntervalMatch Function - Implementing IntervalMatch Function in QlikView Application

5. Now we can see the data generated by the IntervalMatch Function

QlikView IntervalMatch Function - Implementing IntervalMatch Function in QlikView Application

Explore QlikView Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download Now

Conclusion

In QlikView, the data is stored in the tables, and this data is altered at regular intervals. So this data is matched with the duration or interval of another table. For matching the data, we will use IntervalMatch Function. IntervalMatch Function is used in the QlikView Script to compare the data present in the two tables.

Course Schedule
NameDates
QlikView TrainingNov 02 to Nov 17View Details
QlikView TrainingNov 05 to Nov 20View Details
QlikView TrainingNov 09 to Nov 24View Details
QlikView TrainingNov 12 to Nov 27View Details
Last updated: 03 Apr 2023
About Author

Viswanath is a passionate content writer of Mindmajix. He has expertise in Trending Domains like Data Science, Artificial Intelligence, Machine Learning, Blockchain, etc. His articles help the learners to get insights about the Domain. You can reach him on Linkedin

read less