Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Subtracting Holidays from Business Days

MadeInHB
8 - Asteroid

So I have the business days calculating correctly.  Is there anyway to have alteryx look at a list of dates, see if these dates are in the range (Start Date and End Date) and return a 1 if it is and a 0 if it is not?

 

Example:

 

Start Date is 2/27/2017

End Date is 3/2/2017

Holiday is 3/1/2017.

 

 

21 REPLIES 21
alex
11 - Bolide

Can you supply a file as an example.  Not sure exactly what you need from your description.

MadeInHB
8 - Asteroid

So right now I have business days calculating.  For the example 2/27 - 3/2, it is calculating 3 days.  But let's say 3/1 is Holiday.  I am looking for a way to have Alteryx see 3/1 as a Holiday and return a 1.  Then I can set the formula to do 3-1, to return that it is actually 2 business days and not 3.  But I am stuck with the variable holiday dates.

alex
11 - Bolide

will there be a file with a list of holiday dates ? If so then you can use generate row to create all the dates between the start and end dates, join to the holiday list, filter out weekends and holidays, and then summarize to count the dates. 

Search community for "Calculate Business Days Between Dates" for a helpful article.

 

 

 

Philip
12 - Quasar

There may be a more elegant way, but here is one using Find/Replace Tool. I'd prefer this over Join to avoid duplicating records. Instead, it looks to see if the date is contained in the Holiday list. Note that the orange section is just creating dates to use in the example.

 

Mark holidays.png

alex
11 - Bolide

Join wouldn't create duplicate records, but Append Fields would.

Philip
12 - Quasar

You're right. I was thinking about another situation as I was writing that. Sorry for any confusion!

MadeInHB
8 - Asteroid

Phillip - this was much simpler than the route I was going down.  Mine was all over.  Thanks very much!!!

Pallavimore001
5 - Atom

Hi, how can I return count of holidays from a given date range? I have two columns with Start Date and End Date and multiple rows with different date ranges - I want to know how many holidays fall within each date range - and have it as an additional column?

Philip
12 - Quasar

See if this is what you need. I built it off of what MS's documentation says about NETWORKDAYS.

 

(Hold on, found a couple of errors.)

Labels