Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

US Holidays, Weekends, and Reporting Days Macro

abraggwf
5 - Atom

Hey all,

 

I created a macro I got a lot of use out in my previous roles. It takes in a single field of dates, finds the first and last date in that set, and returns 4 outputs for the date range:

 

  • H – A list of all holidays, their observed dates, their official name at the Fed, and a colloquial name.
  • W – A list of all weekends only
  • C – A combined list of holidays and weekends
  • R – A list of all reporting days

It also knows when each holiday was first implemented (Juneteenth won't show up before 2021), so you can use it to calculate US holidays all the way back to the founding of America!

 

You could easily adjust the inputs to ask from dates from a picker interface or split the start and end dates to be separate inputs, if that is something you need.

 

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@abraggwf 

Thanks for sharing.

But you sure the "Independence Day" holiday starts from 2021? 😃
2025-04-30 105918.jpg

abraggwf
5 - Atom

Hah! Great catch. Juneteenth and July 4th should be swapped. I'll update it.

Labels
Top Solution Authors