Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
EliGohar
Partner - Specialist
Partner - Specialist

Avg duration per Unique ID

Hi Everyone,

I'm having this Raw data of visits of objects per unique FaceID:

image.png

I made a calculation the sums up the total duration per each FaceID (max end time - min start time), this is the result:

image.png

My next goal is to find the average duration of the calculation I made in the right column.

I can present it in table (highlighted in red), but I want to take it into KPI/Different Chart as a measure.

Can you assist with the expression?

Thanks,

Eli.

Labels (1)
4 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

try sthing like :

 

time(avg(aggr(YourIntervalCalculation,FACEID)),'hh:mm:ss')

 

EliGohar
Partner - Specialist
Partner - Specialist
Author

@OmarBenSalem 

Thanks for your response, I've tried your suggestion:

time(avg(aggr(Interval(Max([End Time]) - Min([Start Time])),FACEID)),'hh:mm:ss')

But got a wrong result: 

image.png

Eli.

OmarBenSalem
Partner - Champion II
Partner - Champion II

Maybe you should try to aggregate by all the dimensions in your table 

Aggr(expression, dim1,dim2,dim3 etc)

EliGohar
Partner - Specialist
Partner - Specialist
Author

I tried but still not getting the expected result as in the table's total.