Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
LD72
New Contributor

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
Valued Contributor III

Re: Fractile calculation for duration / time stemps

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

else Can you upload sample file to check.

Thanks,
Mohammed Mukram
MVP & Luminary
MVP & Luminary

Re: Fractile calculation for duration / time stemps

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

LD72
New Contributor

Re: Fractile calculation for duration / time stemps

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

Highlighted
LD72
New Contributor

Re: Fractile calculation for duration / time stemps

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

LD72
New Contributor

Re: Fractile calculation for duration / time stemps

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