Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
soniasweety
Valued Contributor III

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
Tags (3)
5 Replies

Re: Measure convert to hrs

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

      floor( 123456 / 3600 )

soniasweety
Valued Contributor III

Re: Measure convert to hrs

Not working same result it is giving

kaanerisen
Contributor III

Re: Measure convert to hrs

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
Valued Contributor III

Re: Measure convert to hrs

for second expression how can I include the interval?

kaanerisen
Contributor III

Re: Measure convert to hrs

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