Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Measure convert to hrs

Hi all,

I have a measures like below all the result showing in  seconds I want to display as hr's   I tried below but not getting the exact result

1) (ElapsedTime-[Critical])   

2) =if(ElapsedTime>=Urgent and ElapsedTime<=Critical,ElapsedTime-Urgent,Null())

3)=if(ElapsedTime>=Normal and ElapsedTime<=Urgent,ElapsedTime-Normal,null())

I tried like  //=num(floor( (ElapsedTime-[Critical])/3600,'##.##')    how to get exact format  like only I need  1139,1139,783,   like in all 3 expresions how to include?

it is showing 

   

1139.449167
1139.451389
783.4472222
1379.579444
874.3669444
5 Replies
Anonymous
Not applicable

Maybe remove the Num() function with the '##.##' formatting just leaving something like this

      floor( 123456 / 3600 )

soniasweety
Master
Master
Author

Not working same result it is giving

kaanerisen
Creator III
Creator III

Use interval function to get results as hours.

How about this:

interval(ElapsedTime-[Critical],'hh:mm')

Example:

interval('2.5555','hh:mm') or interval('2,5555','hh:mm')  based on your system variables.

Result = 61:19

soniasweety
Master
Master
Author

for second expression how can I include the interval?

kaanerisen
Creator III
Creator III

=if(ElapsedTime>=Urgent and ElapsedTime<=Critical,interval(ElapsedTime-Urgent,'hh:mm'),Null())