Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Split time range into days

Hi,

I am super-new to Qlik Sense and still learning the basics. 

I have a split up of time ranges in my load statement and this is working, but now need to split the 8am to 5pm range into two separate ones - one that is for that time range Monday to Friday and one that is for that time range for Saturday and Sunday.  This is what I have for the original ranges:

"Operation DateTime"

   if ( ... ,'Midnight to 8am',

   if (..., '5pm to Midnight',

   if(timestamp(frac("Operation DateTime"),'hh:mm')>='08:00:00' and timestamp(frac("Operation DateTime"),'hh:mm') <'17:00:00', '8am to 5pm'))) as Timegroup

Any help greatly appreciated - my main load page has DayNames ="Mon,;Tue.;Wed.;Thu,;Fri,;Sat,;Sun.'; and the ReferenceDay=0;

Thanks

2 Replies
Highlighted

May be remove seconds in the red color from below

 if(timestamp(frac("Operation DateTime"),'hh:mm')>='08:00:00' and timestamp(frac("Operation DateTime"),'hh:mm') <'17:00:00', '8am to 5pm'))) as Timegroup

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Contributor
Contributor

Hi, thanks for the reply.

Sorry no, the script is working as is, whether there are seconds or not, but I have to duplicate it so I have two separate ones that include the current script but with an added condition that one will separate into weekdays and one into weekends.

 

So need the same time range as in the script, but also one with weekdays and one with weekends.