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: 
anuradhaa
Partner - Creator II
Partner - Creator II

Shift Allocation Based on Reload time

I have Attached data.

i need to categorized those data based on shifts.

 

Shift 16:3014:30
Shift 214:3022:30
Shift 322:306:30

Here i want to consider times for most recent shifts based on reload time.

If the reload time is 07:00 AM  2015/11/06

my shifts should be

Shift 1 - 2015/11/05  22:30 - 2015/11/06  06:30

Shift 2 - 2015/11/05  14:30 - 2015/11/06  22:30

Shift 3 - 2015/11/05  06:30 - 2015/11/06  14:30

Hope you are clear with my requirement. I have reload this every hour

2 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey Anuradha,

You can do it something like this:

if([shift field] = 1, (Date(ReloadTime(), 'DD/MM/YYYY') - 1) & ' ' & [start hour field] & ' ' & (Date(ReloadTime(), 'DD/MM/YYYY') - 1) & ' ' & [end hour field],

     if([shift field] = 2, (Date(ReloadTime(), 'DD/MM/YYYY') -1) & ' ' & [start hour field] & ' ' & (Date(ReloadTime(), 'DD/MM/YYYY') -1) & ' ' & [end hour field],

          (Date(ReloadTime(), 'DD/MM/YYYY') -1) & ' ' & [start hour field] & ' ' & Date(ReloadTime(), 'DD/MM/YYYY') & ' ' & [end hour field])

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Can you please share a sample .