Formula adjustment to handle the year-end cutover
Answers
-
I am having similar trouble with the year-end start and due formulas. Ideally, I'd like to show the number of upcoming tasks based on the start, finish, and current date that handles the year-end cutover.
Level = 0 is the task level. Summary levels start at 1 and go up from there for each indent.
- Start this week | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Start@row) = YEAR(TODAY()), WEEKNUMBER(Start@row) = WEEKNUMBER(TODAY())), 1)), "Data Needed")
- Due this week | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Finish@row) = YEAR(TODAY()), WEEKNUMBER(Finish@row) = WEEKNUMBER(TODAY())), 1)), "Data Needed")
- Start this month | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Start@row) = YEAR(TODAY()), MONTH(Start@row) = MONTH(TODAY())), 1, 0)), "Data Needed")
- Due this month | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Finish@row) = YEAR(TODAY()), MONTH(Finish@row) = MONTH(TODAY())), 1, 0)), "Data Needed")
- Start next month | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Start@row) = YEAR(TODAY()), MONTH(Start@row) = MONTH(TODAY()) + 1), 1, 0)), "Data Needed")
- Due next month | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Finish@row) = YEAR(TODAY()), MONTH(Finish@row) = MONTH(TODAY()) + 1), 1, 0)), "Data Needed")
- Start in two months |=IFERROR(IF(Level@row = 0, IF(AND(YEAR(Start@row) = YEAR(TODAY()), MONTH(Start@row) = MONTH(TODAY()) + 2), 1, 0)), "Data Needed")
- Due in two months | =IFERROR(IF(Level@row = 0, IF(AND(YEAR(Finish@row) = YEAR(TODAY()), MONTH(Finish@row) = MONTH(TODAY()) + 2), 1, 0)), "Data Needed")
Since the year doesn't match at year-end, the formulas broke leading up to Jan 1, 2023. Any help you can provide will be greatly appreciated.
-
Hi, Ryan,
Give the following a try.
find_week (the expression below finds the week(s) between the Start@row and TODAY())
((YEAR(Start@row) - YEAR(TODAY()))*52 + WEEKNUMBER(Start@row) - WEEKNUMBER(TODAY()))
Start/Due this week when find_week = 0; i.e., IF( find_week = 0, 1) .
find_month (the expression below finds the month(s) between the Start@row and TODAY())
((YEAR(Start@row) - YEAR(TODAY()))*12 + MONTH(Start@row) - MONTH(TODAY()))
Start/Due this month when find_month = 0; i.e., IF( find_month = 0, 1, 0) .
Start/Due next month when find_month = 1; i.e., IF( find_month = 1, 1, 0) .
Start/Due in 2 months when find_month = 2; i.e., IF( find_month = 2, 1, 0); when "find_month" is replaced with the expression...
IF(((YEAR(Start@row) - YEAR(TODAY()))*12 + MONTH(Start@row) - MONTH(TODAY()))= 2, 1, 0)
=IF(Level@row = 0, IFERROR(IF(((YEAR(Start@row) - YEAR(TODAY()))*12 + MONTH(Start@row) - MONTH(TODAY())) = 2, 1, 0),"Data Needed"))
-
Thank you, I'll give it a try!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!