Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

rustyfishbones
Honored Contributor 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
MVP
MVP

Re: Creating a shift pattern flag

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
Honored Contributor II

Re: Creating a shift pattern flag

Thanks Petter,

But my Dates and Times are in Seperate fields.

Regards

Alan

MVP
MVP

Re: Creating a shift pattern flag

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
Honored Contributor II

Re: Creating a shift pattern flag

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
Honored Contributor II

Re: Creating a shift pattern flag

Still no Joy, can anyone else help?

Highlighted
MVP
MVP

Re: Creating a shift pattern flag

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...