Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

zied_ahmed1
Contributor III

convert number to minute and seconde

Hello,

I have this set analysis in Qlik Sense

sum({<$(vSetPeriodPres)>}CALLSANSWEREDDELAY)/ sum({<$(vSetPeriodPres)>}CALLSANSWERED)

the result is 0,55

but i need that be 00:55 minutes

Thanks for help

1 Solution

Accepted Solutions
zied_ahmed1
Contributor III

Re: convert number to minute and seconde

Hello,

The solution is :

=interval(timestamp#(round(sum({<$(vSetPeriodPres)>}CALLSANSWEREDDELAY)/ sum({<$(vSetPeriodPres)>}CALLSANSWERED)),'m'), 'hh:mm')

Thansk for all

11 Replies
lucpechali
New Contributor II

Re: convert number to minute and seconde

Hello ZIED,

use the function interval()

interval(sum({<$(vSetPeriodPres)>}CALLSANSWEREDDELAY)/ sum({<$(vSetPeriodPres)>}CALLSANSWERED)) as xxx


And use interval number format in your application



You can also format the output format using interval(sum(x),'hh:mm:ss')


Hope it helps


zied_ahmed1
Contributor III

Re: convert number to minute and seconde

Hello Luc,

Thanks for help,but when i use the function i have the same result 0,55..

Regards

lucpechali
New Contributor II

Re: convert number to minute and seconde

Here's an little example

MVP
MVP

Re: convert number to minute and seconde

I am confused. Your expression is a ratio of times. How would that make sense expressed as a time/interval? It seems to me that it should be expressed as a decimal (0.55) or a percent (55%).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
lucpechali
New Contributor II

Re: convert number to minute and seconde

Hi Jonathan,

I was supposing his fields were time format and he'd like to have a total for the delays

zied_ahmed1
Contributor III

Re: convert number to minute and seconde

total response time / Total answred calls

MVP
MVP

Re: convert number to minute and seconde

How about

=Interval(Sum({<$(vSetPeriodPres)>} CALLSANSWEREDDELAY) / Sum({<$(vSetPeriodPres)>} CALLSANSWERED) / 24, 'hh:mm')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
luismadriz
Valued Contributor

Re: convert number to minute and seconde

Hi Zied,

It all depends on the unit of CALLSANSWEREDDELAY. If it's hours then you use this:

=Interval(Sum({<$(vSetPeriodPres)>} CALLSANSWEREDDELAY) / Sum({<$(vSetPeriodPres)>} CALLSANSWERED) / 24, 'hh:mm:ss')

If CALLSANSWEREDDELAY is in minutes then you use this:

=Interval(Sum({<$(vSetPeriodPres)>} CALLSANSWEREDDELAY) / Sum({<$(vSetPeriodPres)>} CALLSANSWERED) / 24 / 60, 'hh:mm:ss')


I hope this helps,


Luis

zied_ahmed1
Contributor III

Re: convert number to minute and seconde

Hello,

The solution is :

=interval(timestamp#(round(sum({<$(vSetPeriodPres)>}CALLSANSWEREDDELAY)/ sum({<$(vSetPeriodPres)>}CALLSANSWERED)),'m'), 'hh:mm')

Thansk for all

Community Browser