Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

try sthing like :

 

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

 

Highlighted
Partner
Partner

@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.

Highlighted
Partner
Partner

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

Aggr(expression, dim1,dim2,dim3 etc)

Highlighted
Partner
Partner

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