1 Reply Latest reply: Jan 29, 2010 2:05 PM by John Witherspoon RSS

    yesterday using today() in set analysis

      Hello,

      I am attempting to use today() to get the value of yesterday in set analysis. I am getting a value for the expression below however, I do not believe it is correct. Basically I am attempting to sum sales where EndDate is greater than or equal to yesterday.

       

      =sum({$<EndDate={">=$(=today(),-1)"}>} Sales)

       

      Any help, or validation would be greatly appreciated.

       

      Thanks much,

      Jeff

       

       

       

       

        • yesterday using today() in set analysis
          John Witherspoon

          Looks like a syntax error to me - it shouldn't allow the comma after today(). Assuming that's just a typo when posting, it looks right to me. However, you may need to format the result as a date of the same format as EndDate. So, for instance, if EndDate has a format of 'DD/MM/YY', you may need to use sum({<EndDate={">=$(=date(today()-1,'DD/MM/YY'))"}>} Sales). Set analysis isn't very good with date comparisons, and needs the formats to match in order to recognize they're the same, unlike an if() statement, for instance.