1 Reply Latest reply: Nov 28, 2013 9:26 AM by Stefan Wühl RSS

    Set analysis - weeks back ?

    Tom Fox

      Hi there,

       

      I have a column in my document for the sum of the val in the past 7 days which is below:

       

      =Sum({< dated = {'>=$(=Date(V_todayminus7days13weekroller))<=$(=Date(V_today13weekroller))'} >} val)


      The variables are currently:


      V_today13weekroller- =today()

      V_todayminus7days13weekroller- =today() - 7

       

      Now I need to sum the val where the date is within the last 13 weeks (replicating the SQL command ‘datediff(ww,dated,getdate()) <=13’).   Does anyone know how to get the date for the start of the week 13 weeks ago ?  Or can think of a better way of doing this ??

       

      Many Thanks

       

      Tom