Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

MVP
MVP

Re: Identify two consecutive dates and get hours difference between it

I am not sure I understand.. can you share a sample to check this out?

Highlighted
josecanalla
New Contributor III

Re: Identify two consecutive dates and get hours difference between it

I get error loading script: "Field CheckTime not found"

josecanalla
New Contributor III

Re: Identify two consecutive dates and get hours difference between it

In your first response you say that I have to put two dimensions: EmployeeID and Date.

In what way can I get the "Date" dimension? Only I have timestamps.

MVP
MVP

Re: Identify two consecutive dates and get hours difference between it

You can create a date field in the script like this

Date(Floor(checktime)) as Date

simon_minifie
Contributor III

Re: Identify two consecutive dates and get hours difference between it

Take out the drop table.

It shouldn't happen, but sounds like the two tables are auto concatenating.

Thanks,

Smon

cazztfplease
Contributor

Re: Identify two consecutive dates and get hours difference between it

I had to do something similar in one of my projects for a help ticket tracker.

In your scenario, you could just replace the 'created' field value with your 'Clock-in' value and the 'resolved' field value with your 'clock-out' value.  I would imagine similar results.

Comm.PNG

Resolution Time expression is:

Interval(interval#(ceil(($(vResolutionTime))),'s'), 'dd:hh:mm:ss') 

where the variable is defined  as:

(resolved - created) *86400