Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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')

View solution in original post