Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with the SUM of Hours

Hi

I have a situation with the SUM of Hours,

For example I SUM this Hours

2:00hr + 2:00hr + 2:00hr + 1:57hr and the result with this expression I’m using are 7.95hr and not the real result that is 7.57hr.

This is the expression I’m using:

Sum(Interval((interval#(HoursFac, 'hhhh:mm' )*24),'hhhh:mm'))

I will appreciate your help

Thanks.

1 Solution

Accepted Solutions
gandalfgray
Specialist II
Specialist II

In the Chart properties

goto the Number tab,

mark the Expression

and tick the Interval

chartpropnumber.JPG

View solution in original post

5 Replies
gandalfgray
Specialist II
Specialist II

I'm guessing, but what if you set the Number format of the expression to "interval"?

/GG

Not applicable
Author

How I create the number format to interval?

Thanks ..

MayilVahanan

Hi,

     Can you say the format of your HoursFac?? data itself having hr. i.e. 2.00hr? Can you post a sample?

     Sum(Interval((interval#(HoursFac, 'hh:mm' )*24),'hh:mm'))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
gandalfgray
Specialist II
Specialist II

In the Chart properties

goto the Number tab,

mark the Expression

and tick the Interval

chartpropnumber.JPG

Not applicable
Author

Thanks it was the format ..