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.

Want to Become an Expert in QlikView? Then visit here to Learn QlikView Training Online.

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 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.

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_Time, TaskNo

01:00          5:00             Task1

03:00          04:40           Task2

03:45          11:00           Task3

 #Data Set for events happened

Subscribe to our youtube channel to get new updates..!

 Actual_Time, Task

02:00,            Start Task1

02:45,            Stop Task2

03:20,            Restart Task1

04:15,             Stop Task1

02:30,             Start Task3

03:10,             Stop Task3

04:45,             Start Task2

05:30,            Start   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_Time End_Time Actual_Time Task
01:00 05:00 02:00 Start Task1
01:00 05:00 02:30 Start Task3
01:00 05:00 02:45 Stop Task1
01:00 05:00 03:10 Stop Task3
01:00 05:00 03:20 Restart Task1
01:00 05:00 04:15 Stop Task1
01:00 05:00 04:45 Start Task2
03:00 04:40 03:10 Stop Task3
03:00 04:40 03:20 Restart Task1
03:00 04:40 04:15 Stop Task1
03:45 11:00 04:15 Stop Task1
03:45 11:00 04:45 Start Task2
03:45 11:00 05:30 Stop 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.