25 Replies Latest reply: Dec 17, 2015 5:03 AM by Ruben Marin RSS

    Closed two month period flag in load script

    Андрей Шепель

      Good day!

      in load script i made flag for last closed month name:

      month(Addmonths(Today()-1, -1))

      Now i need to make flag (0/1), which will filter data for last closed 2 month period.

       

      Such as:

       

      if(month(Addmonths(Today()-1, -1))='Jan',

      here must be Jan (for all years)

      ,

      if(month(Addmonths(Today()-1, -1))='Feb'

      ,

      here must be Jan-Feb (for all years),

       

       

      if(month(Addmonths(Today()-1, -1))='Mar',

      here must be Feb-Mar (for all years)

      ,

      if(month(Addmonths(Today()-1, -1))='Apr',

      here must be Mar-Apr (for all years)

      ,

      if(month(Addmonths(Today()-1, -1))='May',

      here must be Apr-May  (for all years)

      ,

       

      if(month(Addmonths(Today()-1, -1))='Jun',

      here must be May-Jun  (for all years)

      ,

       

      if(month(Addmonths(Today()-1, -1))='Jul',

      here must be Jun-Jul  (for all years)

      ,

      if(month(Addmonths(Today()-1, -1))='Aug',

       

      here must be Jul-Aug  (for all years)

      ,

       

      if(month(Addmonths(Today()-1, -1))='Sep',

       

      here must be Aug-Sep  (for all years)

      ,

      if(month(Addmonths(Today()-1, -1))='Oct',

      here must be Sep-Oct  (for all years)

      ,

       

      if(month(Addmonths(Today()-1, -1))='Nov',

      here must be Oct-Nov  (for all years)

      ,

      if(month(Addmonths(Today()-1, -1))='Dec',

      here must be Nov-Dec  (for all years)

       

      ))))))))))))

       

      Please, help!)