Add business days to a date based on logic (Conditional if then else)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Date | Type |
2021-05-24 | IXRE |
2021-05-25 | SAS-MXP |
2021-06-05 |
Any help is appreciated.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Take a look at the solutions in these threads, I think both should get you going in the right direction
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Add-business-days-to-date/td-p/56743
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
if you throw in a filter with tonumber(datetimeformat([date],"u"))>=6 - you'll filter out saturdays and sundays.