Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ganeshreddy
Creator III
Creator III

logic Help !

Hi All,

How to get work period difference on particular day for each employee, for example take last three rows of employee number 102 ,there is more than one row for this combination on 29/04/2015, record the time difference between the last out punch of the previous row and the first in punch of the current row as the time between shifts. Here the time difference has to be in hour and minute combination. I am finding difficulty while calculating work period difference, please help me here.   Please find the attached QVW.


Cheers,

Ganesh.

 

1 Solution

Accepted Solutions
Not applicable

Plz check this QVW. Hope this helps.

View solution in original post

4 Replies
Not applicable

Plz check this QVW. Hope this helps.

ganeshreddy
Creator III
Creator III
Author

Hi Ashish,

Thanks for your replay, Your logic is working fine in this QVW, But the same logic not working in my actual application.

Output coming as i mentioned in attached QVW. I can you identify reason why i am getting like that. PFA.

Cheers,

Ganesh

ganeshreddy
Creator III
Creator III
Author

Hi,

i mean output is coming like this if we apply filter Emp_ID as 107.

    12:00:00 AM

    12:25:00 AM

    12:45:00 AM

    02:25:00 AM

    02:50:00 AM

    04:30:00 AM

cheers,

Ganesh

Not applicable

Hi in script instead of using this line :

Time(if(Previous([Emp ID]) = [Emp ID] and Previous(Date) = Date, Actual_In - Previous(Actual_Out),0)) as WorkPeriodDiff

format the time..

Time(if(Previous([Emp ID]) = [Emp ID] and Previous(Date) = Date, Actual_In - Previous(Actual_Out),0), 'hh:mm:ss') as WorkPeriodDiff