Announcement

Collapse
No announcement yet.

Report filter by current week

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Report filter by current week

    Would be great to be able to have reports filter by current week.

    I see last 7 days and current month but not this week.

    In the current uncertain times we are trying to influence more short term sales behaviour.

  • #2
    Gentle bump on this one.

    Comment


    • #3
      Hi olof,
      Please set this filter for the report (for more details see screenshot):

      If the first day of a week is Monday:
      Code:
      EQUAL:(WEEK_NUMBER_1:(closeDate), WEEK_NUMBER_1:(NOW:()))
      If the first day of a week is Sunday:
      Code:
      EQUAL:(WEEK_NUMBER_0:(closeDate), WEEK_NUMBER_0:(NOW:()))
      Attached Files

      Comment


      • #4
        Brill - thanks!!

        Comment


        • #5
          I get the following 500 error when I try this:

          [2020-06-24 08:16:15] Espo.ERROR: (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'call.close_date' in 'where clause'; GET /api/v1/Report/action/run?id=5e80e790ece832ee6&where=; line: 1758, file: /usr/share/nginx/html/application/Espo/Modules/Advanced/Services/Report.php [] []

          Comment


          • #6
            Hi Olof,
            It was the example for Opportunity. Call doesn't have closeDate field. For use this logic for Call you need to do something like this:
            1. Open Administration -> Entity Manager -> Call -> Fields -> Add new field of the 'Date' type (let's call it 'dateEndDate').
            2. Add this formula to the Call entity:
            Code:
            dateEndDate = dateEnd;
            3. Open the Call entity list view -> select all records -> Actions -> Recalculate Formula.
            4. Change the expression in your Report to:
            Code:
            EQUAL:(WEEK_NUMBER_0:(dateEndDate), WEEK_NUMBER_0:(NOW:()))

            Comment

            Working...
            X