
1. Re: Calculating Working Hours (excl weekends)
Alastair Young Feb 7, 2017 3:32 AM (in response to johann taljaard)Good Morning Johann,
I have reviewed your data and see that only specific dates are provided against two countries.
I have 14 days in January, and 16 days in February when looking at the Ireland Data. Is this correctly representative data on that you would expect the working hours to be 140 hrs and 160 hours respectively?
Normal date comparisons assume the days are continuous from the start date to the end date and thus would not calculate the correct number of days when compared to your dataset.
Please let me know your expectations.
Many Thanks
Alastair

2. Re: Calculating Working Hours (excl weekends)
Tushar More Feb 7, 2017 4:21 AM (in response to johann taljaard)Hi Johann,
Please find my approached to your problem.
Hope this works for you.

ExampleData.twbx 55.6 KB


3. Re: Calculating Working Hours (excl weekends)
johann taljaard Feb 7, 2017 4:21 AM (in response to Alastair Young)Hi Alistair.
I am not sure what you are asking about countries etc.
See Example Data line 2
Ticket_Key Created Resolved
ACIASD9460 21/12/2016 10:15 03/01/2017 14:54
So I need to calculate (Resolved  Created) * 24
That gives me the consecutive hours.
But I need to find a way to exclude NONworking hours and weekends.
I hope that clarifies?
Thanks,
Johann

4. Re: Calculating Working Hours (excl weekends)
johann taljaard Feb 7, 2017 5:00 AM (in response to Tushar More)Hi.
Your calculation is:
DATEDIFF('day',[Created],[Resolved])
and includes weekends and out of office hours  or am I missing something here?
What I am looking to do is to exclude Out Of Office hours.
J

5. Re: Calculating Working Hours (excl weekends)
Shinichiro Murakami Feb 7, 2017 5:54 AM (in response to johann taljaard)I hope this post helps.
Re: Space utilization/Finding times within ranges
And this is the reference of networkdays functions in tableau.
EXCEL's "networkdays" s alternative
Thanks,
Shin

6. Re: Calculating Working Hours (excl weekends)
johann taljaard Feb 7, 2017 6:48 AM (in response to Shinichiro Murakami)I will have to play around a bit and see if I can figure it out.
Seems like a difficult one.

7. Re: Calculating Working Hours (excl weekends)
Shinichiro Murakami Feb 7, 2017 7:24 AM (in response to johann taljaard)1 of 1 people found this helpfulJohann,
Yes, that 's not very easy.
If you still have trouble, I can try on your own file.
But if you can figure out by yourself, you gain the good knowledge/skills which will help you in the future
Best Regards,
Shin

8. Re: Calculating Working Hours (excl weekends)
Shinichiro Murakami Feb 10, 2017 5:37 PM (in response to johann taljaard)1 of 1 people found this helpfulHere is a similar request.
Calculating True Average Handle Time (Working Time)
And better way to exclude weekends.
Excel's Networkdays Alternative (Count days excluding Weekend) [version 2]
Thanks,
Shin

9. Re: Calculating Working Hours (excl weekends)
Miikka Uosukainen Mar 15, 2017 5:50 AM (in response to johann taljaard)Hey,
I think this should solve your problem. The "workhour" calculation is kind of excessive, but it can be used to calculate also out of office hours tickets correctly (basically there are 9 different use cases as noted in calculated field comments).
Please let me know if this works as intended.

Workhour_calculation.twbx 142.5 KB
