Why is my Friday considered as next week?
Hello Smartsheet Community,
I'm currently setting up few formulas for Admin Dashboard. So I would a certain date period be counted as This Week or Next Week.
This Week:
=IF(WEEKDAY([Start Date]@row) = 1, IF(AND(YEAR(TODAY()) = YEAR([Start Date]@row), WEEKNUMBER(TODAY()) = WEEKNUMBER([Start Date]@row + 1)), "Current Week"), IF(WEEKDAY([End Date]@row) > 1, IF(AND(YEAR(TODAY()) = YEAR([End Date]@row), WEEKNUMBER(TODAY()) = WEEKNUMBER([End Date]@row)), "Current Week")))
Next Week:
=IF(WEEKDAY([Start Date]@row) = 1, IF(AND(YEAR(TODAY()) = YEAR([Start Date]@row), WEEKNUMBER(TODAY()) = WEEKNUMBER([Start Date]@row)), "Next Week"), IF(WEEKDAY([End Date]@row) > 1, IF(AND(YEAR(TODAY()) = YEAR([End Date]@row), WEEKNUMBER(TODAY()) + 1 = WEEKNUMBER([End Date]@row)), "Next Week")))
My Today() is 23/5/2024
Everything works well, but when I tried 24/5/2024 - 28/05/2024, it considered that as Next Week instead.
Answers
-
It is because of how you have your formula written. Since the weekday of [Start Date] is not 1, it moves on to evaluating the [End Date] weekday. The [End Date] weekday is greater than 1 and the year matches, but the week number is not the same as today's week number.
In your next week formula, the same is true in that it is evaluating the [ENd DAte]. Since that week number is today's week number plus 1, it is outputting "Next Week".
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 213 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!