Weekday Function that displays last 7 days

zbr
zbr ✭✭✭
edited 07/01/22 in Formulas and Functions

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

  • Genevieve P.
    Genevieve P. Employee Admin
    edited 07/01/22 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

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    edited 07/01/22 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

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!