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.

aveeeeeee7en
Valued Contributor III

Exclude Holidays & their Time from Running Logic...............!!

Hi All

I have to exclude Holidays coming inbetween the Creation Date and Outime.

The Logic for Duration Calculation is Perfectly working but i want to exculde Holidays & their time from it.

If  Number(Ticket ID) has Start Time = 0:00 and End Time = 23:59 than exclude only Holiday Dates - '26/1/2014', '15/08/2014' and '02/10/2014' from the Calculation of Duration.

Else, Remove the Holiday Dates of Individual Number(Ticket ID) referring the Attached Excel from the Calculation of Duration.


Expected Result:

Expected Result.png


See the Cases:

Case No. 1:

Cases - 1,2,3.png

Case No. 2:

Cases - 4,5.png

Stefan Kunte  Kindly look into this.... Your help required.

Also, see the Attachments.

Regards

Av7eN

Tags (1)
1 Reply
darkhorse
Valued Contributor

Re: Exclude Holidays & their Time from Running Logic...............!!

Hello,

I think you can solve it by flagging you table.

Let's say you have a holiday table and Tickets table. Pseudo should be something like:

Block1:

Just join these two to get FLAG_1 for holiday days.

Block2:

Recall Block1 (resident Block1) to check the hours to create FLAG_2 for holiday hours with something like if(FLAG_1=1 and StartTime =0 and EndTime=23:59 then 1, else if .... then 2.... etc

So now you've got everything to calculate I guess.

Go for things like sum({<FLAG_2={1}>} HOUR_DIFFERENCE)

Hope that helps.

BR

Serhan

Community Browser