community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Calculate Business Days in Month, Removing Holidays

Asteroid

Recently I needed to calculate working days per month for a report that includes past complete months (e.g. January 2019) as well as the current, incomplete month (e.g. July 2019, as I write). In the case of the current, incomplete month, I have to grab the 'data_through_this_date' with the fileName for my process.

 

I also need to remove holidays.

 

My employer has six holidays and a policy of Saturday holiday = take prior Friday off, Sunday holiday = take following Monday off

 

Our holidays are:

  • New Year's Day - January 1
  • Memorial Day - Last Monday in May
  • Independence Day - July 4
  • Labor Day - 1st Monday in September
  • Thanksgiving Day - 4th Thursday in November
  • Christmas Day - December 25

So, I built my workflow to follow this logic.

 

All you need to update are:

1. Date field of your data (mine is [Sales Month] in the text input)

2. Business logic for what holidays your employer has, and how they treat weekend holidays

Asteroid

Thank you for sharing! Super useful!  

Labels