Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

Calculating Day Weights for business days

Highlighted
7 - Meteor

Hello,

 

I am looking to calculate the "Day Factor" column below. If i have a date range, i want to assign Business Days as 1 and non business days as 0. This portion is already predefined. The question i have, is that if a Business day is followed by a non business day, i want to assign the weekend days to the last business day before the non business day. Hence, below for 4/3/20, since it is a Friday, its day factor is 3 (it's counting Friday, Saturday and Sunday). For 4/9/20, its day factor is 4 (counting Thursday, Friday, Saturday, Sunday) since Friday is a Holiday.

 

 

DateType of DayDay of WeekDay Factor
3/30/2020Business DayMonday1
3/31/2020Business DayTuesday1
4/1/2020Business DayWednesday1
4/2/2020Business DayThursday1
4/3/2020Business DayFriday3
4/4/2020WeekendSaturday0
4/5/2020WeekendSunday0
4/6/2020Business DayMonday1
4/7/2020Business DayTuesday1
4/8/2020Business DayWednesday1
4/9/2020Business DayThursday4
4/10/2020HolidayFriday0
4/11/2020WeekendSaturday0
4/12/2020WeekendSunday0
4/13/2020Business DayMonday1
Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @jdejesus, assuming your data already has Type of Day column the attached solution might help you achieve your end goal.

AbhilashR_0-1588985970729.png

Let us know if this isn't what you are looking for.

 

Highlighted
9 - Comet

Hi @jdejesus  - here is my solution....... give a value to "Business day", map non-business days back to last business day and do a count and join back.

Highlighted
7 - Meteor

Thank you both! both work for me.

Labels