Forum Discussion

CodyMckelvey's avatar
CodyMckelvey
Qrew Member
3 months ago

Previous Work Day

I have a very simple problem that seems to be more complicated than it should be. I have a report that I would very simply like to report on the previous day. This works fine from Tues-Fri, however, when it comes to Monday it needs to be manually adjusted for Friday. QB does not seem to have work days built into the date field.

I've tried a few report formulas which can display the previous work date just fine. Though I cannot for the life of me figure out a way to filter the report on that date. Another option would be to somehow make a formula that shows the number of days in the past that the previous work day occurred.

Any help would be much appreciated.



------------------------------
Cody Mckelvey
------------------------------

3 Replies

  • How about a formula checkbox field called [Previous Day?]

    [My Date Field] = ToWeekdayP(Today())

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ToWeekdayP (Date d)

    Description: If the given date d is a weekday returns it, otherwise returns the previously occurring weekday.

    Example: ToWeekdayP(ToDate("6/21/2003")) returns 6/20/2003



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • CodyMckelvey's avatar
      CodyMckelvey
      Qrew Member

      I guess some more context is there is a field in our DB tracking all activity on a given day. We report on the previous day that the specified activity took place. This is fine all circumstances besides Monday, as the previous date for Monday is Sunday. I'm not quite sure how to utilize the checkbox to achieve this? Apologies, I'm not too familiar with the report formulas. 



      ------------------------------
      Cody Mckelvey
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion

        I'm suggesting that you make a real field of type formula checkbox.  Then make a report that users that field as a Dynamic Filter,  or as the report filter if you just want a report for the previous business day.



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------