Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IntervalMatch()

Hai All

       could somebody explain INTERVAKMATCH() and pickmatch() with  easy examples..

5 Replies
kalyanivintha1
Creator II
Creator II

hi,

Interval match is used to link/match a..discrete numeric values to one or more numeric values.

such as...date,time stamp..etc.,

pick() function is alternative to the if condition

Else condition in pick match.

its_anandrjs

Check this simple example related to the Interval Match from Qlik Help

OrderLog:

LOAD * INLINE [

    Start, End, Order

    01:00, 03:35, A

    02:30, 07:58, B

    03:04, 10:27, C

    07:23, 11:43, D

];

EventLog:

LOAD * INLINE [

    Time, Event, Comment

    00:00, 0, Start of shift 1

    01:18, 1, Line stop

    02:23, 2, Line restart 50%

    04:15, 3, Line speed 100%

    08:00, 4, Start of shift 2

    11:43, 5, End of production

];

IntervalMatch (Time) LOAD Start, End Resident OrderLog;

Regards

Anand

Not applicable
Author

Thanks Hemanth

Not applicable
Author

Hi Kalyani

              Thanks for your Complement...l have a small doubt...What is the usage of this method (IntervalMAtch) I want real time example.

Thanks

Karthick

kalyanivintha1
Creator II
Creator II

Hello karuppasamy,

Interval match is used to match the  numeric values.

suppose.,

if you take a..data like this,

Grade Table:

load * inline [ Grade,Start,End

                         fail,0,39

                          D,40,49

                          C,50,59

                          B,60,69

                           A,70,79

                           A+,80,100 ];

and

Marks Table:

load * inline [ Marks,SId

                        9,101

                        20,102

                        31,103

                        45,104

                        50,105

                        61,106

                        76,107

                        82,108

                        90,109

                        99,110 ];

without using any interval match function is going to get result like this:

without interval match is going to assign the all grades for each and every student in that list like below,

  Result:(without interval match) :              

                     Marks,SId,Grades

                         9,101,fail

                         9,101,D

                         9,101,C

                         9,101,B

                         9,101,A

                         9,101,A+

                         20,102,fail

                          20,102,D

                          20,102,B

                          20,102,C

                          20,102,A

                          20,102,A+

                       31,103,fail

                                  .

.                                  .

                        31,103,A+

                        45,104,D

                        50,105,C

                        61,106,A

                        76,107,C

                        82,108,B

                        90,109,C

                        99,110,fail..................

in this type of scenarios we can use interval match function to get better and correct results.

IntervalMatch(Marks)

Load

     Start,

     End

     Resident Grades;

         

          Here..from our example Marks is the dimension which  is changing ...toward the students,

based on the student performance marks are going to change for every one..because

we are applying interval match function to the marks dimension,

based on start and end marks from Grades table.

then it is going ti give the correct result as fallows:

Result:(with interval match)

                        Marks,SId,Grades

                        9,101,fail

                        20,102,fail

                        31,103,fail

                        45,104,D

                        50,105,C

                        61,106,B

                        76,107.A

                        82,108,A+

                        90,109,A+

                        99,110,A+

and

if you have any scd you can apply interval match.

Thanq.