Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MalcolmCICWF
Creator III
Creator III

Convert/Format Decimal to Appropriate Time

So I have found pieces of this discussion, but have not received a solution trying to put them all together.

I have data where the field is represented in minutes and then divided by another field to get an Average Handle Time of a call. I get results where the average is .73 minutes, 10.6 minutes, and 85 minutes as examples. I need these minutes broken out into proper Hours, Minutes, and Seconds.

So far I have tried some Time formatting and taking the results *60, but cannot solve formatting the final results to hh:mm:ss successfully. What am I doing wrong? I am assuming it's easiest to do this right away in the script?

1 Solution

Accepted Solutions
sunny_talwar

May be this?

Table:

LOAD *,

  Interval(KeepChar(Time, '0123456789.')/1440, 'h:mm:ss') as NewTime;

LOAD * Inline [

Time

0.73 minutes

10.6 minutes

85 minutes

];

Capture.PNG

View solution in original post

11 Replies
hector_munoz
Specialist
Specialist

Hi Jeremy,

Try the following formula: Timestamp(NUMBER, 'hh:mm:ss').

Regards,
H

swuehl
MVP
MVP

Maybe

=Interval( Sum(Time) / Count(Calls) / ( 60 *24), 'hh:mm:ss')

sunny_talwar

May be this?

Table:

LOAD *,

  Interval(KeepChar(Time, '0123456789.')/1440, 'h:mm:ss') as NewTime;

LOAD * Inline [

Time

0.73 minutes

10.6 minutes

85 minutes

];

Capture.PNG

MalcolmCICWF
Creator III
Creator III
Author

Ok, so I would love to try some of these suggestions, thank all of you, but I am having an issue.

Can anyone tell me why it is not displaying all of my data in a chart, but it will in a table box? I have never had this issue. There is data under each CALL_CENTER and each SKILL, but the data will not display in my chart... I am working with 12k accounts, and I swear everything was displaying at one point, I even went as far as making the report over from scratch in case I altered the settings.

sunny_talwar

Since you have not used any aggregation (Sum or Avg or Min or Max or something else), your chart doesn't know what to show for places that have multiple values and ends up showing null. Using Sum, shows results

Capture.PNG

MalcolmCICWF
Creator III
Creator III
Author

I thought there was a way to set it to just display the value instead of using an Aggregation function, but neither the thread nor the place for that discussion

sunny_talwar

So are your concerns resolved then?

swuehl
MVP
MVP

You can use a straight table like a table box by using all fields you want to show as dimensions and disable 'suppress zero values' on presentation tab.

MarcoWedel

Hi,

maybe you mean to convert your Average_Handle_Time_MIN field in the script already?

Then maybe one solution might be also:

QlikCommunity_Thread_247691_Pic1.JPG

SER_CAMPAIGN:

LOAD

  ...

  IN_CALL+WRAPUP/SUCCESS_OPER_TRANSFERS        as Average_Handle_Time_MIN,

  Interval((IN_CALL+WRAPUP/SUCCESS_OPER_TRANSFERS)*'00:01') as Average_Handle_Time,

  ...

Resident SER_Opt;

hope this helps

regards

Marco