Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

joeybird
Contributor II

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

Re: Qlik Sense - time taken to reach target

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


talk is cheap, supply exceeds demand
9 Replies

Re: Qlik Sense - time taken to reach target

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


talk is cheap, supply exceeds demand
joeybird
Contributor II

Re: Qlik Sense - time taken to reach target

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

Re: Qlik Sense - time taken to reach target

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


talk is cheap, supply exceeds demand
joeybird
Contributor II

Re: Qlik Sense - time taken to reach target

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

Re: Qlik Sense - time taken to reach target

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


talk is cheap, supply exceeds demand
joeybird
Contributor II

Re: Qlik Sense - time taken to reach target

Hiya

thanks for your help on above, excellent xx

Kind Regards

Joey bird

joeybird
Contributor II

Re: Qlik Sense - time taken to reach target

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

Re: Qlik Sense - time taken to reach target

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


talk is cheap, supply exceeds demand
joeybird
Contributor II

Re: Qlik Sense - time taken to reach target

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