Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to remove time of absence (Interval match?)

Hi

I have two tables, one with the start /stop date for the bookings and the booked time per day

Table 2 is a table of abscense with start / stop date for the absence. They are linked by ID. I want to show the sum(time/day) but with the time of absence removed. (Table 2 don´t have information about time/day)

Example: Id 1 has a booking from 2013-01-01 to 2013-02-10 with 20 min / day. If the person are abscense for 2 days, 2013-01-05 - 2013-01-07 I want to remove 40 min from the sum of the time.

Should I some how interval match the tables in the script or what is the best way to do it?

2 Replies
vivientexier
Partner - Creator II
Partner - Creator II

Add a flag (in your script) : a expression with a value of 1 when the the line is not an abscence.

This way, in your graph or table, your expression to count non absence periode will be Sum({< Non_absence_flag={1} >} Expression)

Not applicable
Author

Can you explain a bit more, or show in the attached qvd?

I know how to add a flag and the use of set. But how do I get it to only flag the dates of abscence? (or non abscense)