Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Beez
Contributor II
Contributor II

calculating the mean / Median for the time difference comparison results

Dear all,

Here are my data:

Reception Validation Analyse
29/10/2021 09/02/2023 Consultation
23/03/2023 29/03/2023 Consultation
26/01/2023 27/01/2023 Consultation
10/02/2023 20/02/2023 Consultation

 

Using this expression: Interval(
Floor(NetWorkDays(Min([Reception]), Min([Validation])) - 1) + (frac(Min([Validation])) - frac(Min([Reception]))),
'dd.hh'
)

I have calculated the time difference between the validation and reception time as 334, 6, 4, 1. Now I would like to sum up this value 345 then would like to calculate the mean and median. Say for mean is 86.25 (345/ 4). How could I do it in expression or in script. Like consulation I have different types of analyse types. Thanks in advance for your support.

1 Reply
Or
MVP
MVP

This seems like it should be a standard function, e.g. Avg(Validation-Reception) or Median(Validation-Reception). Note that you would need a Group By clause if you want to do this in script, while in an expression you would need the relevant fields to be included as dimensions.