Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a chart which display the runtime in minutes as 69.77hrs, but the actual value is 69hours 46 minutes
Is there a way in Qlikview where we can convert the value in HH:MM format?
Thanks!
Yee-Haw; we're in real cowboy work-around country with this solution - I'm sure there'll be an easier way but as I don't have your actual data it's the only thing I could test:
=floor(69.77,1)&'Hrs '&round((60*(1-((ceil(69.77,1))-69.77))),1)&'Mins' result = '69Hrs 46Mins'.
Replace the '69.77' with the result of your initial formula - essentially it's working out what 77% of 1hr is - the magic 46mins.
Hope that helps,
Matt - Visual Analytics Ltd
Divide your number by 24 and then use the interval function:
=Interval(69.77/24,'HH:mm')
Regards.
My expression is
SUM
(run_time_minutes/60) = 69.77,
if i write =interval(
(SUM
(run_time_minutes/60) /24),'HH:MM'), i am not getting the value i expected.
Yee-Haw; we're in real cowboy work-around country with this solution - I'm sure there'll be an easier way but as I don't have your actual data it's the only thing I could test:
=floor(69.77,1)&'Hrs '&round((60*(1-((ceil(69.77,1))-69.77))),1)&'Mins' result = '69Hrs 46Mins'.
Replace the '69.77' with the result of your initial formula - essentially it's working out what 77% of 1hr is - the magic 46mins.
Hope that helps,
Matt - Visual Analytics Ltd
Hello,
Check that the format is case sensitive:
=Interval('69,77'/24, 'hh:mm')Hope this helps
I've added Num() to your field name because I'm not sure that it is being interpreted as a number. If it is, you can remove the num() around run_time_minutes. This also makes the assumption that the value for run_time_minutes only has two decimal places. If it has more, you could consider using subfield. It's more process intensive though so I'd avoid it unless you have to.
interval#(floor(num(run_time_minutes))&':'&(round(num('.'&right(num(run_time_minutes),2))*60)),'hh:mm')Thank you , this option works , could you please let me know how do i make the format look like 69:46 instead of '69Hrs 46Mins'
Sorry, Not sure. I haven't seen that before.
You can do
=floor(69.77,1)&':'&round((60*(1-((ceil(69.77,1))-69.77))),1)
to get that format.
It's a shame the interval() function didn't work. What result did you get by trying
interval((sum(run_time_minutes/60)/24),'HH:mm')?
Regards.
FOR EXAMPLE : if the value is 52hrs 44min i get result 12
Thank you!