Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
farheenayesha
Creator
Creator

How to calculate time spent by user on each Dashboard & Sheet

Hi,

     I am trying to calculate, how much time a user has spent on each dashboard and sheet.

Example: In the below image, i want to calculate time spent (in minutes) by user 3 on dashboard 2 and also time spent in minutes on SH01, SH02 and SH03.

The above example is just for one user. However I want  to calculate for all the users. Please help me.

Capture.JPG

Please find the data attached. youssefbelloum

1 Solution

Accepted Solutions
sunny_talwar

Concatenate those values at the end

Table:

LOAD Timestamp,

     User,

     App,

     Object/Action,

     Object Id,

     Details,

     AutoNumber(User&App&Object Id) as CheckKey

From ....;

Temp:

LOAD DISTINCT

     User,

     App

Resident Table;

Left Join

Load * Inline [

Details

Open

Close

];

Concatenate(Table)

LOAD *,

     If(Details = 'Open', MakeDate(2017, 1, 12) + MakeTime(12), MakeDate(2017, 1, 11) + MakeTime(11, 59)) as Timestamp

Resident Temp

Where Not Exists(Key, AutoNumber(User&App&Object Id));

View solution in original post

48 Replies
YoussefBelloum
Champion
Champion

Can you extract this table on excel for me please ?

farheenayesha
Creator
Creator
Author

Sorry forgot to attach the excel. Please find the attachement

shiveshsingh
Master
Master

If we take user 1, for that user doc was opened two times..Do you want to subtract the time between first closed and second open?

TimestampUserAppObject/ActionObject IdDetails
2017-06-15 14:00:50User1Dashboard 1DocumentDocument\SH01Open
2017-06-15 14:01:02User1Dashboard 1DocumentDocument\SH01Close
2017-06-15 14:01:10User1Dashboard 1DocumentDocument\SH01Open
sasikanth
Master
Master

Hi Ayeesha,

use the below expression in Straight table

Dim1: App

Dim2:ObjectID

Exp: interval ( ( Aggr(max(Date(Timestamp)),[Object Id]) - Aggr( min (Date(Timestamp)),[Object Id])) ,'mm')


If you wan to display result in a text object based on selections then you can simple write

=Interval(max(Timestamp)-min(Timestamp),'mm')

farheenayesha
Creator
Creator
Author

Hi Shivesh,

     Thanks for the quick reply. Actually i want to calculate the total time spent on each sheet. Hence in this case i want to take (FirstClose-FirstOpen) + (SecondClose-SecondOpen) because there is some time gap between firstclose and secondOpen.

Please let me know if you need more information. Kindly help

YoussefBelloum
Champion
Champion

Hi,

here is one method to do it:

time spent.png

find attached

qlikview979
Specialist
Specialist

Hi ,

Can you please share your Excel file.

Regards

Mahesh

YoussefBelloum
Champion
Champion

I used Ayeesha's file

farheenayesha
Creator
Creator
Author

Hi Youssef,

     Thanks for your reply. Your logic is working perfectly for the table. However i want to get the same result in the bar chart. I want  to take Object id as the dimension and want to show time (in minutes) for each Object id. Kindly helpCapture1.JPG