
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qlik Interval - Rounding to Seconds only floors
Hi All,
We're working on some call center metrics, and I cannot get my expression to round to the nearest second.
In this example, we have a tolal of 1270 seconds of call time over 24 calls. That equates to 52.92 seconds per call.
When calculating (and formatting) this a the seconds duration level, i would expect it to round to 53, but Qlik gives me the floored 52.
I've tried a number of data type, function (rounding), and formatting options, but can't get anything to perform the way i expect.
Any advice?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems like you have the rounding to seconds figured out but are struggling with combining this with interval. Take your rounded seconds and interpret them as seconds using Interval#(...,'s'). Then format as duration using with the property panel Number Format or wrap the expression in Interval(..., 'hh:mm:ss').
Interval#(Round(sum(totalhandletime)/sum(callshandled)), 's')
-Rob


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems like you have the rounding to seconds figured out but are struggling with combining this with interval. Take your rounded seconds and interpret them as seconds using Interval#(...,'s'). Then format as duration using with the property panel Number Format or wrap the expression in Interval(..., 'hh:mm:ss').
Interval#(Round(sum(totalhandletime)/sum(callshandled)), 's')
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, as always, Rob. You truly are kind, generous, and a life saver!
