Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am still facing the issue with the format.
I have written this in script
num(floor( duration)/3600,'##.##') as mytime,
duration in seconds.
but I need to show with two decimal
am getting output like below I need 1274.62 like that
1274.621667 |
1012.946389 |
Hi sunny,
for your all exp same result check the screen shot
in qlik filterpane
this after export.
the screen shot which shows hours is correct but when I write your expression it is not showing the same result.
Num is a formatting command it changes the displayed format, but does not alter the actual value.
So your export has the actual data value not the display value.
You need to use round() to change the actual value
round( duration/3600, 0.01) as new
is it correct way or not?Colin Albert
my original exp:
interval(round(interval#(if(ETime>=Urgent and ETime<=Critical,ETime-Urgent,Null()), 'ss'), 1/24), 'hh')
I changed to below bcz I have same issue for this also, I didn't test because I don't have data to see output can anyone give help out of it
=round(if(ETime>=Urgent and ETime<Critical,ETime-Urgent,Null()),0.01)
1 Hour = 1/24 = 0.416666, are you looking to show this as 0.42? If that is what you are after, then what you have looks good....
sunny,
this exp calculation is
if(ETime>=Urgent and ETime<Critical,ETime-Urgent,Null())
etime>= 36000sec and etime<critical is 56000sec
so this result I want to show in hours with two decimals.
Hi sony, maybe with:
Round(DurationInDays*24, 0.01)
or:
Round(DurationInSeconds/86400*24, 0.01)
If you use interval you can see 86400 but that's only the text representation, internally it stores the numeric value '1' (86400 seconds = 1 day), so 86400 (interval-seconds) + 1 = 2, and also 24 (interval-hours) + 1 = 2.
To do this operations maybe it's better to do the maths, multiplying the days by 86400 to get the seconds.
What are ETime, Urgent and Critical? are all values? or dates?
What are ETime, Urgent and Critical? are all values? or dates?
above all values in seconds only.
and have you tried the expression?:
Round(DurationInSeconds/86400*24, 0.01)