1 Reply Latest reply: Dec 22, 2016 11:37 AM by Sunny Talwar RSS

    Need Help - Date Range Calclulation

        hi All:


      The existing questions in the forum got me this far (thanks to all previous posts), however I am stuck.


      I have an existing calculating that gives me YTD Sales thru Current Week, I am trying to do same thing but for last year and I am striking out. See below.




      // Trying to get sales thru current week for last year.  I got it to work for current, but having issues for last


      // These are my revised date statements and yield the dates I want




      //New Code for LAST YEAR

      SUM({$<KEY_DATE = {'>=$(=addmonths(=YearStart(Today()),-12))<=$(=AddMonths(=WeekEnd(Today()),-12)}>}[Invoice Subtotal])




      // SUM({$<KEY_DATE = {'>=$(=YearStart(Today()))<=$(=WeekEnd(Today()))'}>}[Invoice Subtotal])