Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Fractile calculation for duration / time stemps

Dear all,

we are fairly new to Qlik Sense and are trying to figure out, how to calculate the 90% percentile for a duration. Unfortunately we could not find anything either in Help nor Community. As we are new, apologies upfront if we missed anything.

In detail, we are calculating the duration of a process from two different time stamps in ISO format, set at the beginning and ending of the process, I will call them Stemp1 and Stemp2. We are able to calculate the average time of the process duration simply by using

   AVG(Stemp2-Stemp1)

and are able to show the results in hh:mm:ss.

We figured we could use the same approach for the 90% percentile, showing at what length 90% of the processes were completed by using

   fractile((Stemp2-Stemp1), 0.9)

While the results on a high level seem reasonable, they are only coming up in days, minutes and seconds are always shown as zero. It is as if the time format has been set to hh:00:00. We need the result to be in minutes though. Even if we adjust the format to mm:ss, the result is coming back in “days” (24:00; 48:00; …). Does anyone know how?

Appreciate your help

 

Labels (2)
5 Replies
mdmukramali
Specialist III
Specialist III

Hi,
can you try something like : Fractile((Sum(Stemp2)-Sum(Stemp1)),0.9)

else Can you upload sample file to check.

Thanks,
Mohammed Mukram
marcus_sommer

You might need a double-aggregation maybe in this way:

fractile(aggr(AVG(Stemp2-Stemp1), Dim1, Dim2), 0.9)

See also: ChartFunctions/aggr.htm.

- Marcus

Anonymous
Not applicable
Author

Thank you Mohammed, but unfortunately I am still not succesful. I will upload a sample file once I am back from business trip tomorrow

Anonymous
Not applicable
Author

Thank you as well Marcus, appreciated. But not succesful.

Anonymous
Not applicable
Author

Dear all,

 

if interested: I was able to solve the above by adding interval  to the equation, resulting in the following calculation:

 

fractile(interval([Stemp2]-[Stemp1]),.9)

 

Kind regards
LD