5 Replies Latest reply on Mar 21, 2017 11:52 AM by Justin Pulley

    Count the Number of Records in the Previous week

    Justin Pulley

      I cannot create this as a filter, it must be built into a calculated field because I have two columns and one of them is a YTD column that would not work with a filter for this in place.

       

      I need to come up with a formula that says COUNT([Records]) IF the [Start Date] occurred in the previous week from this week.  I tried

       

      IF MAX([Start Date]) <  DATETRUNC('week',MAX([Start Date]))

           THEN COUNT([Records])

      ELSE 0

      END

       

      That doesn't seem to work.  I should have 7 records in the Previous week (3-13 through 3-19) and I get 0.