Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate Interval Hours

Hi everyone,

I have a question regarding the time interval calculation in QlikView. I am using the following expression:

"Interval (sum ([hours worked]) - sum ([Total Business Hours]), 'hh: mm')" whose purpose is to calculate the balance of hours (bank of hours) of my company. However, if the balance exceeds 24:00, the value will be incorrect. If I have, for example:

Total Business Hours: 2659:05

Hours worked: 2856:00

My balance of hours would be: 196:55

But in my qvw appears: 2491:05

How can I solve this problem?

Regards,

Labels (1)
13 Replies
Not applicable
Author

Not works!

othniel2014
Contributor III
Contributor III

What filters used for Appears: 2491: 05?

Not applicable
Author

othniel2014

You put a answer bellow:

Try:

=Interval(

Interval(Sum([Horas Úteis - Total Horas])*count([Funcionário - Nome]),'HH:mm')

-

Interval(sum([Ponto - Horas Trabalhadas]),'HH:mm')

,'hh:mm')

This answer solved the problem. But I couldn't see anymore.

othniel2014
Contributor III
Contributor III

=Interval(

Interval(Sum([Horas Úteis - Total Horas])*count([Funcionário - Nome]),'HH:mm')

-

Interval(sum([Ponto - Horas Trabalhadas]),'HH:mm')

,'hh:mm')