Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting order picks for nightshift

Hello,

I have a problem with counting order picks in night and dayshift.

A Shift starts at 20 o clock and ends at 20 o clock the next day.

The Nightshift 20 to 24h should be added to the 0 to 20h Dayshift of the next day.

Example

DateDayshift 0-20hNighshift 20-24hTotal DateTotal Shift
09-10-201210011111X+100
10-01-201220076276211
11-01-201230043343376
12-01-201240088488443


I have the following fields/expressions:

Hour

Date

sum(Picks)

Is it possible to get the Total Shift figure?

One requirement: I don't have to chose a single date, also when I chose more than one date it should work.

Many thanks and kind regards

Philipp

2 Replies
hic
Former Employee
Former Employee

What about using  RangeSum ([Dayshift 0-20h],Above([Nighshift 20-24h]))

as formula for "Total Shift"?

/HIC

swuehl
MVP
MVP

Philipp,

you could create a Timestamp out of Date and hour, and then use daystart with dayoffset parameter:

LOAD

...

Hour,

Date,

DayStart(num(Date)+maketime(Hour),1 , (20/24) ) as ShiftDate

..

from Table;

Hope this helps,

Stefan