Intervalmatch function in qlikview LEARNOVITA

Intervalmatch Function in Qlikview | Everything You Need to Know [ OverView ]

Last updated on 02nd Nov 2022, Artciles, Blog

About author

Y K Singh (Sr.QlikView Application Developer )

Y K Singh has 6+ years of experience in data warehousing, BI, Problem-solving in Qlik Sense/Sprinting Issues. His articles help the learners to get insights about the Domain.

(5.0) | 19524 Ratings 2202
    • In this article you will learn:
    • 1.What is IntervalMatch function in a QlikView?
    • 2.Syntax of IntervalMatch Function.
    • 3.IntervalMatch (Extended Syntax).
    • 4.Example of IntervalMatch Function.
    • 5.How its works.
    • 6.Why use QlikView IntervalMatch?
    • 7.Implementing IntervalMatch Function in QlikView Application.
    • 8.Advantages of IntervalMatch Function.
    • 9.Conclusion.

What is IntervalMatch function in a QlikView?

Interval Match is one of the functions in a QlikView that can be used to match a number of numbers in one table like a date, time stamp, points, percentage or any number to an interval or length of time in the second table. One or more smart data that changes over time is what an IntervalMatch does. It can be used to deal with size differences by connecting the right key fields with the right number intervals. It can also be used with your choice of LOAD, Inline or SQL statements.

Syntax of IntervalMatch Function:

  • IntervalMatch (match_field) (selected statement | loadstatement)

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

Match field: This argument includes the different values ​​that should be matched with an intervals.

Key field: This argument includes an additional attributes matched to translation.

Upload a statement or select a statement: This argument includes a separate data points and additional keys to be uploaded to be QlikView by the “IntervalMatch” Startup.

IntervalMatch (Extended Syntax):

The extended IntervalMatch prefix is ​​used to create table corresponding to various numerical values ​​and intervals of one or more numbers while simultaneously comparing a values ​​of one or more additional keys:

  • This is a more powerful and flexible feature that can be used to link a works with changing sizes over time Slowly changing size.
  • The start of an IntervalMatch should be set prior to a Load or Select loading intermittent statement.
  • A table containing different data points and additional keys must have already been be uploaded to QlikView prior to a IntervalMatch launch statement. Start converts a loaded table of intervals and keys in a table containing the additional column numerical data points.
  • It also expands the number of a records so that a new table has one record with the possible combination of a vague data point interval and number (s) of keys.
  • The selected load statement or statement should be out of a table where the first two fields contain a lower and upper limit of each period and the third and any subsequent fields contain a key (s) contained in an IntervalMatch statement.
  • Intervals are be always closed i.e. end areas are included in a limit. Non-numerical constraints cause an interval to be ignored (explained).
  • To avoid a neglecting unspecified intervals may need to allow the NULL values ​​to map to other fields that form a lower or higher intervals. This may be governed by a NullAsValue statement or by a specific tests that replace NULL with a numerical value before or an after any numerical data points.
Intervalmatch Function in Qlikview

Example of IntervalMatch Function:

Let’s consider a three tasks that need to be done in a CPU and that the tasks have a start and end time. name those functions as Task1, Task2, Task3. will now analyse a actual start time of those activities and for that and will take two tables:

#Data Set For CpuTasks:

  • Star_Time End_Time TaskNo
  • 01:00 5:00 Activity1
  • 03:00 04:40 Activity2
  • 03:45 11:00 Activity3

#Data is set for events:

  • Time_Real Task
  • 02:00 Start Activity1
  • 02:45 Stop Work2
  • 03:20 Restart Activity1
  • 04:15 Stop Work1
  • 02:30 Start Work3
  • 03:10 Stop Work3
  • 04:45 Start Work2
  • 05:30 Start Work2

The code above is written in a script editor as below :

  • CpuTasks:
  • Upload * To_Line {
  • Time_first, End_ Time, Task Number
  • 01:00 05:00 Activity1
  • 03:00 04:40 Activity2
  • 03:45 11:00 Work3};
  • Jobs;
  • Upload * To_Line {
  • Real-time, Work
  • 02:00, Start Work1
  • 02:45 Stop Work1
  • 03:20 Restart Activity1
  • 04:15 Stop Work1
  • 02:30 Start Work3
  • 03:10 Stop Work3
  • 04:45 Start Work2
  • 05:30 Stop Work2};
  • IntervalMatch (Real-Time) DOWNLOAD_Time_Start, Time_End
  • CpuTasks resident;

After enabling a script we will create a Thumbnail Box object to display a data created by the IntervalMatch Task.Data generated by an IntervalMatch Function will be displayed as below :

  • Star_Time End_Time Real-time activity
  • 01:00 05:00 02:00 Start Work1
  • 01:00 05:00 02:30 Start Work3
  • 01:00 05:00 02:45 Stop Work1
  • 01:00 05:00 03:10 Stop Work3
  • 01:00 05:00 03:20 Restart Activity1
  • 01:00 05:00 04:15 Stop Work1
  • 01:00 05:00 04:45 Start Work2
  • 03:00 04:40 03:10 Stop Work3
  • 03:00 04:40 03:20 Restart Activity1
  • 03:00 04:40 04:15 Stop Work1
  • 03:45 11:00 04:15 Stop Work1
  • 03:45 11:00 04:45 Start Work2

How its works:

The beginning of an IntervalMatch must come before a LOAD or SELECT statement that loads data in small chunks. Before the IntervalMatch startup statement the field with the different data points and extra keys must have already been uploaded to QlikView. This field in a table on this site is not read automatically by the startup. Start changes a table of intervals and keys that has been loaded into a table with an extra column for numerical data points. It also grows a number of records so that each possible combination of vague data point interval and number (s) of keys is in one record in a new table.Intervals may overlap, and different values may be linked to the same intervals in different ways.The extended IntervalMatch prefix is used to make tables that correspond to different numbers and intervals of one or more numbers while comparing the values of one or more other keys at the same time. This is a more powerful and flexible feature that can be used to link works whose sizes change over time size changes slowly.

Why use QlikView IntervalMatch?

The QlikView IntervalMatch operation is alleged to be useful as a result of it’s similarity because of a variety of numbers from either inside one table to a length of your time or intervals in the another table. Also it helps to preserve a QlikView memory as do not need recent duplicate information to match it with this one however will roll in the hay through this operation.

Qlikview

Implementing IntervalMatch Function in QlikView Application:

Steps to be Applying IntervalMatch operate:

  • First going to open a QlikView Application.
  • Going to currently open a text editor.
  • When gap a text editor, and going to improve a text victimisation IntervalMatch operate.
  • When changing a text, we are going to produce Table Sheet Item within a sheet layout window.
  • Will currently see the info generated by a IntervalMatch operate.

Advantage of IntervalMatch Function:

1. Storage Memory:

Maintains a QlikView Application Memory as it avoids loading all numerical values ​​that are may have to table these facts.

Conclusion:

At QlikView data is saved in tables and this data is periodically updated. So this data is compared to duration or interval of another table. To match the data will use a IntervalMatch Function. The IntervalMatch function is used in a QlikView Script to compare existing data in a two tables.

Are you looking training with Right Jobs?

Contact Us

Popular Courses