Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to round up time in qlikivew . For that I am having below data:
EX: Original Data Output
22.40 23
23.46 24
23.57 24
It means if after decimal data is > 30 then it should be round up
Load
OriginalValue,
IF(Num(SubField(OriginalValue,'.',2),0.01)>30,
Num(SubField(OriginalValue,'.',1))+1,
Num(SubField(OriginalValue,'.',1))) as NewValue
Inline
[
OriginalValue
22.40
23.46
23.57
24.20
24.10
];
Hi Manish Kachhia,
No actually I want to handle it expression side. I have already written some expression then I will get
22.40, 23.46 ,23.57 n then after that I want to convert it in time i.e, 23,24,24
=hour(ceil(time#('22:40','hh:mm'),1/24))
Bill,
=hour(ceil(time#('22:40','hh:mm'),1/24)) - this is giving me correct ans as 23.
but i have another time as 0:27, so applying above logic, I am getting ans as 1, where I should get 0.
Ooops!!!
Should have used round() and not ceil(), try this :
=hour(round(time#('0:27','hh:mm'),1/24))