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.

Screenshot 2022-06-30 114203.png

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
    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.

    Screen Shot 2022-07-01 at 10.17.01 AM.png


    Cheers,

    Genevieve

    Need more information? ๐Ÿ‘€ | Help and Learning Center

    ใ“ใ‚“ใซใกใฏ (Konnichiwa), Hallo, Hola, Bonjour, Olรก, Ciao!๐Ÿ‘‹ | Global Discussions

Answers

  • Genevieve P.
    Genevieve P. Employee
    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.

    Screen Shot 2022-07-01 at 10.17.01 AM.png


    Cheers,

    Genevieve

    Need more information? ๐Ÿ‘€ | Help and Learning Center

    ใ“ใ‚“ใซใกใฏ (Konnichiwa), Hallo, Hola, Bonjour, Olรก, Ciao!๐Ÿ‘‹ | Global Discussions

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!