4 Replies Latest reply on Jan 17, 2017 7:37 AM by Norbert Maijoor

Hello,

I am trying to calculate Number of Business Days in Given Month and Number of Remaining Business Days. What I have done is I have Created to Parameters From date (This holds the 1st date of the month like 01/01/2017 for January 1st 2017) and End Date (This holds the last date of the month like 01/31/2017 for January 31,2017). What I need is i need to calculate number of business already past in the month and number of Business days remaining in month. I will like to use today Function to get system date.

Thanks,

Kalyan

• 1. Re: Calculating Business days

Hi Kalyan,

I think this is a good starting point for your journey concerning counting business days

• 2. Re: Calculating Business days

Hi Kalyan,

The link shared by Norbert should definitely help. You can tweak the calculation described there just a bit to get the number of business days before today:

DATEDIFF("weekday", [Start Date], [Today])

- 2 * (DATEPART('week', [Today]) -DATEPART('week', [Start Date]))

+ (IF DATENAME('weekday',[Today]) = 'Saturday' OR DATENAME('weekday',[Start Date]) = 'Sunday'

THEN 0 ELSE 1 END)

[Today] is a parameter but can be replace with TODAY(). A similar approach can be taken for days after today.

The workbook attached has both calculations.

Hope this helps!

1 of 1 people found this helpful
• 3. Re: Calculating Business days

Further to the posts here already I would like to suggest;

1. Search the forum. The question has been asked hundreds of times before

2. Post your Tableau Packaged Workbook including your sample data along with some more details on what you consider to be 'business days'.

• 4. Re: Calculating Business days

Hi Tom,

Based on our own environment and experience we assume that the everybody on this planet has "free" acces to the internet and a "semantic search" will give the same result.

For sure this is not always the case.