Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Counting Business Days, disregarding holidays

ZoeM
8 - Asteroid

Hello Champs.

I have a need to calculate the number of business days between Start and End disregarding any holidays. And if there is no End date available, calculate # of business days to today.

Below is a sample of data with the requirement.

 

 

Business Days Example.JPG

 Thanks!

11 REPLIES 11
Qiu
21 - Polaris
21 - Polaris

@ZoeM 

Glad to help/

El_Lobo
5 - Atom

I have several run-ins to count weekdays between dates, excluding holidays, etc for reports such as productivity.

To account for multiple scenarios, I created this macro to be an "all-in-one" solution for me.

It counts whatever days of the week I want and exclude Holiday I provide within a range.

Here is a summary of how it works:

 

  • Input
    • Data - Your data to reference and output. Must include a Start Date and End Date
    • Holiday Dates - Your list of dates to exclude from being counted
      • Optional input
  • Questions
    • Input Start Date - Select the column that is considered your Start Date
    • Input End Date - Select the column that is considered your End Date
    • Column Name of Results - Enter the name you want the result column to be.
      • (Default = 'WeekDays')
    • Weekday - Select the days of the week you want to count
    • Holiday - Select the column that is considered your Holiday date
  • Output
    • Results - Returns all columns from Data Input and a column with the name you entered for the results

 

Hope this will save some headaches and time.

Labels