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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Time Spent in One day

Hi,

I want ot setup an formula for the mentioned scenario:

Suppose I have Four  coloum.

NameDateTimeMode
a1 July8:00am in
a1 July5:00pmout
b2 july8:00 amin
b

2 july

10:00am out
b

2 july

10:15am in
b

2 july

5:00pmout

Now I want to find out the Whole time spent by the people for particular day .

Regards

Jyothish KC

Best Regards,
KC
2 Replies
swuehl
MVP
MVP

Please check the solution I proposed in this thread.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like:

interval(rangesum(sum({<Mode={'Out'}>}Time),-sum({<Mode={'In'}>}Time)),'hh:mm')

if your Time field contains strings instead of numeric times you'll have to make times of them first. This is best done in the script:

load

    Name,

    Date,

    time#(Time,'h:mmtt') as Timem

    Mode

from ...somewhere...;


talk is cheap, supply exceeds demand