Working day are usually Monday through Friday excluding public holidays. Calculating the number of working days spent is often useful for in business analytics for a variety of indicators since most businesses do not work on weekends. This post will share the steps to dynamically calculate the number of working day in the current month everyday.
Below are steps to create a dynamic working days calculation, that changes daily.
Step 1: Create data source
This could be a Comma-separated values file (.csv) or Microsoft Excel spreadsheets (.xls) with at least 2 columns to hold the day, month and year as a date and the number of working days as an integer.
Step 2: Connect to this data source in Tableau
Create a table with your date and the number of working days
Step 3: Create a calculated field
I like to call this Dynamic Working days
This is adapted from https://www.theinformationlab.co.uk/2017/05/22/calculate-working-days-dates-tableau by Ian Baldwin
Step 4: Verify
Drag Dynamic working days into the row shelf to verify that the number of working days past is correct for the current month.
Step 5: Save
It is important to note that this only works as long as your data source has the relevant date in it. This means that you will need to update your number of working day occasionally to keep it up to day. The number of working days in a month is difficult to automate because holidays vary across dates and countries. To use this in other calculations, you may need to put this within an INT function.
You can create a blend relationship with any data sources provided that also has a date column or columns
Liked this post? Do share it on your social media wall, timeline or feed
Want blog updates and promotions in your inbox
Sign Up Now