Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

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
Highlighted

Re: Convert/Format Decimal to Appropriate Time

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

Re: Convert/Format Decimal to Appropriate Time

Hi Jeremy,

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

Regards,
H

Highlighted
MVP
MVP

Re: Convert/Format Decimal to Appropriate Time

Maybe

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

Highlighted

Re: Convert/Format Decimal to Appropriate Time

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

Highlighted
Creator II
Creator II

Re: Convert/Format Decimal to Appropriate Time

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.

Highlighted

Re: Convert/Format Decimal to Appropriate Time

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

Highlighted
Creator II
Creator II

Re: Convert/Format Decimal to Appropriate Time

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

Highlighted

Re: Convert/Format Decimal to Appropriate Time

So are your concerns resolved then?

Highlighted
MVP
MVP

Re: Convert/Format Decimal to Appropriate Time

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.

Highlighted

Re: Convert/Format Decimal to Appropriate Time

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