Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Add business days to a date based on logic (Conditional if then else)

manjarigoyal1975
7 - Meteor

I need some help in adding the number of business days based on logic in Alteryx. I am not sure how to do it. I have thousands of rows with different values in the column Date and Type. If I use this logic below then it includes Saturdays and Sundays not sure how can I remove the weekends. 

 

LOGIC: if !IsEmpty([Date]) and ([Type] = "IXRE" or IsEmpty([Type])) then DateTimeAdd([Date],15,"days") elseif !IsEmpty([Date]) and [Type] != "IXRE" then DateTimeAdd([Date],10,"days") else Null() endif

 

Sample data

DateType
2021-05-24IXRE
2021-05-25SAS-MXP
2021-06-05 

 

Any help is appreciated.

 

Thanks

2 REPLIES 2
Luke_C
17 - Castor
17 - Castor
apathetichell
19 - Altair

if you throw in a filter with tonumber(datetimeformat([date],"u"))>=6 - you'll filter out saturdays and sundays.

Labels
Top Solution Authors