Calculate number of week days between 2 dates
in progress
Snake Boy290
Something that I still haven't been able to figure out/ understand is a way to calculate the number of week days between 2 dates. Example: I want to know the average number of work days it took to close a ticket. I know excel has a function called NETWORKDAYS that does this but it seams like you have to get creative to do this calculation in tableau. A bonus would also be able to remove company holidays as well from a separate data source
Tableau Tim
in progress
Tableau Tim
planned
Video on Network days in Tableau
Tableau Tim
Network days counts business days so it's not quite the same. Regardless there are two approaches.
1) It depends on your data structure but if you want to count the number of days between 2 dates but that doesn't exist in your data structure then you can use the data model to solve this. I have a video on it here https://www.youtube.com/watch?v=-VmQGQmWYI0 it's the same technique but just need to tag the necessary days. Tableau has a built-in awareness of dates so you can count specific types of days using the date parts from a date.
2) Do the calculation method A colleague has documented it here in a blog post. https://www.theinformationlab.co.uk/2017/05/22/calculate-working-days-dates-tableau/
I could do a video of technique 1 to recreate the network day like effect
It's possible with 1 to include bank holidays as well (95% certain)
Snake Boy290
Tableau Tim: Thanks TIm! Ill give the calculation method a try since that way someone wouldn't have to maintain a date scaffold table.
Tableau Tim
Snake Boy290: Nice. To be honest the date scaffold table is a one shot thing if you create 10 years worth of dates unless you're looking really far out. Have it embedded int he workbook but yes it's one additional thing to break. It sounds crazy but tableau would still be performant if you included 50 years worth of dates ( 17800 rows of dates) in excel.
Snake Boy290
Tableau Tim: That is true. I think it would be a cool vid to take the scaffold table and expand on it for this use case. I could see the use of having a published data source on server that all workbooks use as the best option if the user uses tableau server.
Snake Boy290
I could also see that the best case would be if the data is on a database to create a function to do the number of working days inside server, then export to tableau.