Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

Qlik Sense - time taken to reach target

Hiya

I have a customer column, Check Number column, date time column, and target column

for each customer at different time intervals (Check Number)....a date and time is recorded in the date time column....and current target number

I wish to calculate how much time is taken for the customer to reach the target from e.g 1-100

can this be done?

I know you can do interval (a-b) ect , but my time and date recordings, are all in one column not separate

please help

Kind Regards

Joeybird

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps something like =interval(max({<Target={'<100'}>} DateTime) - min({<Target={'<100'}>} DateTime) ,'h:mm' )


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
Gysbert_Wassenaar

Perhaps something like =interval(max({<Target={'<100'}>} DateTime) - min({<Target={'<100'}>} DateTime) ,'h:mm' )


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

sorry I forgot to add the first min target, is stored at check 1

this can be e.g 40

so I would have to check time difference from 40-100

I have played around with the code, but I cant seem to get it to read from check 1 to git its Min figure.

Please help

kind regards

Joeybird

Gysbert_Wassenaar

Can you post an example data set and the results you expect?


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

here is an exmple

Customer , Check, DateTime,                   Target

1                 1          2015-01-01 00:47        40

1                 2        2015-01-01 00:55        100

result hopefully

Time taken was 00:08:00

Kind Regards

Joeybird

Gysbert_Wassenaar

Ok, try =interval(max({<Target={'100'}>} DateTime) - min({<Target={'<100'}>} DateTime) ,'h:mm:ss' )


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

thanks for your help on above, excellent xx

Kind Regards

Joey bird

joeybird
Creator III
Creator III
Author

Hiya

sorry to be a pain, but how do you get it to stop once its reached its max figure?

sometimes another line of code has been entered the same but at a different date time, to record other figures, even though target has been reached

please help

Kind Regards

Joeybird

Gysbert_Wassenaar

Perhaps =interval(min({<Target={'100'}>} DateTime) - min({<Target={'<100'}>} DateTime) ,'h:mm:ss' )


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

this don't work ,

also I need to get the code to read code

from the moment a line on a customer starts on lower than 100, (so from check 2 - 4)

as some lines look like this

Customer , Check, DateTime,                   Target

1                 1          2015-01-01 00:47        100

1                 2        2015-01-01 00:55          60

1                 3         2015-01-01 01:09         80

1                 4        2015-01-01 01:30         100

please help

Kind Regards