Day count - Date calculation
- 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
Hi All,
Please help me with this very tricky formula to find day count with respect to following condition.
Mon - 1
Tue - 1
Wed - 1
Thu - 1
Fri - 3
except for the below condition.,
- If a month is starting on Saturday or Sunday, then immediate Monday should be a correct business date. If a month is starting with Saturday, then immediate Monday should have 3 day counts and if a month is starting with Sunday, then immediate Monday should have 2-day counts.
- If a month-end day is Friday, subsequent Saturday and Friday should flow in next month and number of day counts should be 1 for that Friday.
Date | Day | Day count | Explanation |
2024-08-01 | Thursday | 1 | Usually Monday to Thursday have day count as 1 and Friday have 3 |
2024-08-02 | Friday | 3 | |
2024-08-05 | Monday | 1 | |
2024-08-06 | Tuesday | 1 | |
2024-08-07 | Wednesday | 1 | |
2024-08-08 | Thursday | 1 | |
2024-08-09 | Friday | 3 | |
2024-08-12 | Monday | 1 | |
2024-08-13 | Tuesday | 1 | |
2024-08-14 | Wednesday | 1 | |
2024-08-15 | Thursday | 1 | |
2024-08-16 | Friday | 3 | |
2024-08-19 | Monday | 1 | |
2024-08-20 | Tuesday | 1 | |
2024-08-21 | Wednesday | 1 | |
2024-08-22 | Thursday | 1 | |
2024-08-23 | Friday | 3 | |
2024-08-26 | Monday | 1 | |
2024-08-27 | Tuesday | 1 | |
2024-08-28 | Wednesday | 1 | |
2024-08-29 | Thursday | 1 | |
2024-08-30 | Friday | 2 | If a month end falls on Friday and the subsequent Saturday falls on the same month, then Friday has day count as 2 |
2024-08-31 | Saturday | ||
2024-09-01 | Sunday | ||
2024-09-02 | Monday | 2 | Since Month is starting on Sunday, then Monday has day count as 2 |
2024-09-03 | Tuesday | 1 |
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Sarath27
Create a yearly calendar in Alteryx use formula tool to get days and then with some formula logic you can get your logics. You can do it by setting in your first cell 2024-01-01 and then generate 365 rows or 366 rows in a leap year and with a simple formula generate the rest of the dates. From these dates generate in a different field the week days and then you have all the data to get your logic set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am really sorry if I put it in a correct way to address the issue
All I want is to assign the day count based on given condition.
Mon - Thursday - Day count should be 1
Friday should be 3.
But the above day count assigning is exempted from the below 2 conditions.
- If a month is starting with Saturday, then immediate Monday should have 3 day counts and
- If a month is starting with Sunday, then immediate Monday should have 2-day counts.
- If a month-end day is Friday, subsequent Saturday and Friday should flow in next month and number of day counts should be 1 for that Friday and for the Monday it should be 3.
Please help constructing a formula for the dates of AUG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Sarath27
I think we can locate the beginning and Ending of the month with Number, then check as below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It works perfectly, thank you so much for this!
