28 Replies Latest reply: Jun 5, 2013 3:17 AM by khagglund RSS

    Last year to "todays" date

      I have a column called Gross Sales Values - Last Year To Date

       

      My selection is:

      Year: 2013.

      Month: jan, feb, mar, apr, may (i.e I can select 1 or many months but in this ex I have selected all from jan to may)

       

      If I make above selection today  (24/05/13) I would like to see the sales between 01/01/12 and24/05/12 but I cannot figure out how to write the set analysis statement.

       

      e.g.

      sum({$<UCYEA4 = {$(=Year(MakeDate(UCYEA4)))}>} amount) => will today (24/05/13) give me sales between 01/01/13 and 24/05/13

       

       

      sum({$<UCYEA4 = {$(=Year(MakeDate(UCYEA4)-1))}>} amount) => will today (24/05/13) give me sales between 01/01/12 and 31/05/12 because last year may has already been a full month.

       

      I assume I need to add a "todaysdate" somehow using the "calendermonthname" (format "jan") ?

       

      Can you help me please. :-)