6 Replies Latest reply: Feb 2, 2012 3:40 PM by slewedsphinx RSS

    If and with date

      I am trying to sum a value between a certain date range for time-series data, grouped by Object (if it falls out of the range I would like the result to be a 0):

       

      =aggr(IF([Date]<MAX([Date]) and [Date] > MAX([Date])-365, sum([Value]),0),[Object ID])

       

      The data consists of Object ID, Date and Value.

       

      The above expression returns 0 when I know for sure the sum should equal a positive integer (e.g. 20).

       

      Please help.

       

      Many thanks.