Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Creating a shift pattern flag

Hi,

I need to create a flag for different shift patterns, one shift happens across 2 days, 6pm on day 1 to 6am on day 2.

I have a calandar obects and input parameters for the times like this

2018-08-17_1400.png

However, the above selection would give me data for a full shift and half of the next shift.

So.....

from 18:00 to 00:00 on the 02/07/2018 - 00:01 to 05:00 on  03/07/2018 but also 18:00 to 00:00 on the 03/07/2018


I want to create a flag of some sort that I can select it so it does not include the part in Bold


Any ideas.

6 Replies
petter
Partner - Champion III
Partner - Champion III

The InDay() function can take a "shift" parameter making it easy to create a flag in your load script that you can check against in your expression with a simple "set expression":

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/ind...

rustyfishbones
Master II
Master II
Author

Thanks Petter,

But my Dates and Times are in Seperate fields.

Regards

Alan

petter
Partner - Champion III
Partner - Champion III

It is easy to add them up (a simple addition) and then use the InDay() function as the date part is an integer and the time is a fraction.

rustyfishbones
Master II
Master II
Author

Yes, I have combined the fields together using a preceding load, and I have tried the InDay function, at the moment with very little joy.

I'll keep at it.    

rustyfishbones
Master II
Master II
Author

Still no Joy, can anyone else help?

petter
Partner - Champion III
Partner - Champion III

It will be easier for you to get help and much easier for us to help you if you have a small sample dataset and/or an application that shows your issue...