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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Worked hours

Hi,

I have the same problem as some other have had here in the community but I can't get the suggested solutions to work. I want to calculate the number of hours worked each day. It works just fine if they have clocked in and out ONCE a day. But when someone clocks in and out more than ONCE, it breaks.

Please see attached file. I have selected an employee that has clocked in twice ion the 7th of January. I would like the calculation to be presented in the pivot chart on the left called "CALCULATION".

Thanks in advance - I'm thankful for suggestions!

6 Replies
tamilarasu
Champion
Champion

Hi Daniel,

Check the attachment.

Capture.PNG

Clock In Expression:

Time(Min(ReportingTimeIn),'hh:mm:ss')

Clock Out Expression:

Time(Max(ReportingTimeOut),'hh:mm:ss')

jagan
Partner - Champion III
Partner - Champion III

Hi,

Just use

Clock In =Max(ReportingTimeIn)

Clock Out= Max(ReportingTimeOut)

and in Number tab select Time for this two expressions.

Hope this helps you.

Regards,

Jagan.

HirisH_V7
Master
Master

Hi,

Check this,

In Time

Time(Aggr(Min(ReportingTimeIn),prv.Person,ReportingDate),'hh:mm:ss')

Out Time

Time(Aggr(Max(ReportingTimeOut),prv.Person,ReportingDate),'hh:mm:ss')

Time Reported

TIME([Clock out]-[Clock in],'hh:mm:ss')

Hope this helps,

Regards,

PFA,

Hirish

HirisH
Not applicable
Author

Hi, Thanks for you response.

Doing it as you describe, I will get a summary from start time to end time. If a person clocks in and out for the first time


06:49:0016:05:0009:16:00

and then clock in for the second time:

19:52:0020:45:0000:53:00

The aggregated time will be 10:09 hours/min and not 13:56 as I understands your solution shows.

Any ideas in how to fix it?

Thanks in advance.

Daniel

jagan
Partner - Champion III
Partner - Champion III

Hi,

Calculate the difference of TimeOUt and Timein in script and just sum up the difference in the chart.

Hope this helps you.

Regards,

jagan.

Not applicable
Author

Hi,

I think I already do that, but it shows the wrong summary as I mentioned aboove.

    if(AttRRepType=3, Time("AttrRepDt_Time"),null()) as ReportingTimeOut,

    if(AttRRepType=1, Time("AttrRepDt_Time"),null()) as ReportingTimeIn,