Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Silambarasan1306
Creator III
Creator III

Finding Shift Time Difference..

Hi,

I have set of data's given below.

EmpShiftInTimeShiftOuttimePunchinTimePunchOutTime
A8:0020:008:3521:30
A9:3021:309:3121:15
B10:0022:009:3221:45
C10:0022:009:5922:01
D11:3023:3011:1523:15
E5:3017:307:0017:15

I want to calculate the person's who active who came >15 mts, who left >5mts, who came >30 mts based on their shiftintime & outtime for each employee.

Could anyone help me with this

4 Replies
sunny_talwar

You want this calculation in the script or front end?

Silambarasan1306
Creator III
Creator III
Author

Anything is fine. But i need in front end.

Thanks

sunny_talwar

May be create flags?

Table:

LOAD Emp,

    ShiftInTime,

    ShiftOuttime,

    PunchinTime,

    PunchOutTime,

    If(PunchinTime - ShiftInTime > MakeTime(0, 15), 1, 0) as [15MinsLate],

    If(PunchinTime - ShiftInTime > MakeTime(0, 30), 1, 0) as [30MinsLate],

    If(PunchOutTime - ShiftOuttime > MakeTime(0, 5), 1, 0) as [5MinsLate]

FROM

[https://community.qlik.com/thread/231210]

(html, codepage is 1252, embedded labels, table is @1);

Capture.PNG

This may not be what you want, but I thought you can use this flags to do any calculations you might want to do.

Silambarasan1306
Creator III
Creator III
Author

Hi Sunny,

If the person came 15mts late, then he won't be appear in 30mins late. See the above image,

Emp  Punchintime   shiftintime

A       8.35               8.00                          but he is coming in all the categories. Verify it.

Actually i want my output in frontend.

  like this,   15mts late, 15mts earlier,between 15mts earlier to 15 mts late

Thanks.