10 Replies Latest reply: Jun 2, 2015 7:06 AM by Sunny Talwar RSS

    Set Analysis to have rolling week range with source date format YYYYMMDD

      Hi there,

       

      I am trying to design a chart which shows order performance over the last rolling week.

       

      My date Field  (Final.DateRequest) is in the format YYYYMMDD

       

      The functions which I am trying to use to have the rolling weeks are

      date   ( WeekStart(  today(),-1) , 'YYYYMMDD' )
      

       

      date   ( WeekEnd(  today(),-1) , 'YYYYMMDD' )
      

       

      and (as expected) they yield the correct results, when used separately and not in a Set Analysis context.

       

      When I try to put all together in a Set Analysis statement, it all goes wrong.

      I cannot already have a (more simple to my eyes) selection of orders for a specific date, let alone a range.

      So a statement like this yield 0 (I have tried all different flavours I could think of, with/without $, "", '' , with/without = etc)

       

      count( {1< Final.DateRequest = { "=$(   =num(date   ( WeekStart(  today(),-1) , 'YYYYMMDD' )   )  )  "} >}  OrderLine# )
      

       

      Anyway, the final result should consider all the Final.DateRequest which are greater/equal than  date ( WeekStart(  today(),-1) , 'YYYYMMDD' ) and smaller than  date ( WeekEnd(  today(),-1) , 'YYYYMMDD' ). Even more difficult than the above

       

      If I go back to basic, and use for example this statement, data is shown correctly (as expected)

       

      count( {1 <  Final.DateRequest=  {  20150420} >}  OrderLine# )
      

       

      Could someone please be so kind to tell me where and what I am doing wrong?

      Thank you