Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!

Alteryx Designer Desktop Discussions

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

Subtracting Holidays from Business Days

MadeInHB
Astéroïde

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 RÉPONSES 21
alex
Bolide

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

MadeInHB
Astéroïde

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
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
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
Bolide

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

Philip
Quasar

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

MadeInHB
Astéroïde

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

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
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.)

Étiquettes
Auteurs des meilleures solutions