Weekday Function that displays last 7 days
Hello,
I currently have a date column with =Today() that tracks the current last 7 days plus the current day, this is paired to data that occurred on the corresponding day in order to display metrics on a dashboard.
As you can see there are zeros on the 25th and 26th as it was a weekend. I am trying to utilize the =Weekday function to track the last 7 days while also removing any weekend dates as there would be no data displayed.
Does anyone have any suggestions or idea on how I am able to display the current last set amount of days while omitting weekend dates. I sincerely appreciate your help!
Best Answer
-
Hi @zbr
Instead of using Weekday, I would suggest using the WORKDAY function!
The structure for WORKDAY is as follows:
=WORKDAY(Date, number of days, optional holidays)
In your instance, the Date is TODAY, the number of days will then be how many days from today. Try something like this:
=WORKDAY(TODAY(), -6)
Then
=WORKDAY(TODAY(), -5)
=WORKDAY(TODAY(), -4)
And so on.
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Answers
-
Hi @zbr
Instead of using Weekday, I would suggest using the WORKDAY function!
The structure for WORKDAY is as follows:
=WORKDAY(Date, number of days, optional holidays)
In your instance, the Date is TODAY, the number of days will then be how many days from today. Try something like this:
=WORKDAY(TODAY(), -6)
Then
=WORKDAY(TODAY(), -5)
=WORKDAY(TODAY(), -4)
And so on.
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!