3 Replies Latest reply: Apr 10, 2012 8:20 AM by Sunil Kumar Chauhan RSS

    Interval Match Vs Class function

    khush1987

      Hi All,

       

      Can anyone explain what is the difference between interval match and class function?

       

      Regards,

      Kush

        • Interval Match Vs Class function
          Dirk Konings

          With intervalmatch you have a table with lower and upper bound. Like 1 till 3, 4 till 6, 7 till 9, 10 till 15, 16 till 20, ...With Class each bound has the same interval (ex. 5 - 1 till 5, 6 till 10, 11 till 15, 16 till 20, ...)

            • Re: Interval Match Vs Class function
              Gaurav Khare

              Hi there,

              can u plsss elaborate your suggestion.. I mean in a manner which can be more understanding.. Thanks in advance

                • Interval Match Vs Class function
                  Sunil Kumar Chauhan

                  if you have a filed then we can divide it into ranges ussing class function

                  ex:

                   

                  a 1 2 3 4 5 6 7 8 9 10

                   

                  if i write Class(a,2) then result will be

                  0 <=  x < 2
                  2 <= x < 4
                  4 <= x < 6
                  6 <= x < 8
                  8 <= x < 10
                  10 <= x < 12

                  12 <= x < 14

                   

                  i mean it create you a bucket

                   

                  where as Interval match matches time with intervals

                  for example

                   

                  OrderLog

                  Start

                  End

                  Order

                  01:00

                  03:35

                  A

                  02:30

                  07:58

                  B

                  03:04

                  10:27

                  C

                  07:23

                  11:43

                  D

                   

                  EventLog

                  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

                   

                  First load the two tables as usual, then link the field Time to the time intervals defined by the fields Start and End:

                  Select * from OrderLog;

                  Select * from Eventlog;

                  IntervalMatch ( Time ) select Start, End from OrderLog;

                   

                  The following table box could now be created in QlikView:

                  Tablebox

                  Time

                  Event

                  Comment

                  Order

                  Start

                  End

                  00:00

                  0

                  Start of shift 1

                  -

                  -

                  -

                  01:18

                  1

                  Line stop

                  A

                  01:00

                  03:35

                  02:23

                  2

                  Line restart 50%

                  A

                  01:00

                  03:35

                  04:15

                  3

                  Line speed 100%

                  B

                  02:30

                  07:58

                  04:15

                  3

                  Line speed 100%

                  C

                  03:04

                  10:27

                  08:00

                  4

                  Start of shift 2

                  C

                  03:04

                  10:27

                  08:00

                  4

                  Start of shift 2

                  D

                  07:23

                  11:43

                  11:43

                  5

                  End of production

                  D

                  07:23

                  11:43

                   

                  hope this helps