Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

theviking
New Contributor II

Excluding breaks

Hi,

I have a table that contains EventId, Start of the event and End of the event.

EventId               EventStart        EventStop

A                         1                         4

B                         4                         5

C                         2                         6

D                         4                         7

E                         6                         8
…and so on.

I also have a table containing start times and stop times of breaks

BreakEvent       Time

BreakStart           3

BreakStop           5

BreakStart           9

BreakStop           12
…and so on

I would now like to generate a table that reduces the Events so that no event “occurs” during a break

EventId               EventStart        EventStop

A                         1                         3

C                         2                         3

C                         5                         6

D                         5                         7

E                         6                         8
…and so on

Event B should not show up in this new table since it starts and ends within a break

The EventStart , EventStop and Time are in reality timestamps

Any Ideas how this could be done? I have tried with interval match but the scripting gets quite ugly and I have not yet been able to get it right.