Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

avg in time format

Hi All,

I am using below expression  for avg time   in KPI object

Avg({<Type={'Phone'}>}DurationSeconds)

so I want to show in  hh:mm:ss  format as result

can anyone suggest ?

   

]
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Another alternative:

Time(Avg({<Type={'Phone'}>}DurationSeconds)/86400 , 'hh:mm:ss')

View solution in original post

7 Replies
tresesco
MVP
MVP

You can use formatting function around the expression like:

Time( Avg({<Type={'Phone'}>}DurationSeconds) , 'hh:mm:ss')

soniasweety
Master
Master
Author

it is showing wrong result.

tresesco
MVP
MVP

Or, if your output of the expression comes in seconds, you may try like:

Time( Time#(Avg({<Type={'Phone'}>}DurationSeconds) ,'s') , 'hh:mm:ss')

soniasweety
Master
Master
Author

my data base result :

avg.PNG

but my qlik result

8348:23:09

soniasweety
Master
Master
Author

this is showing null.

tresesco
MVP
MVP

Trying using floor(), like:

Time( Time#(Floor(Avg({<Type={'Phone'}>}DurationSeconds)) ,'s') , 'hh:mm:ss')

tresesco
MVP
MVP

Another alternative:

Time(Avg({<Type={'Phone'}>}DurationSeconds)/86400 , 'hh:mm:ss')