1 Reply Latest reply on Nov 16, 2016 4:21 AM by Andrew Watson

    Restrict Latest 4 year data

    Sanket Deshpande

      Hi all,

       

      I have my year dimension in the format

       

      Year

      2012-2013

      2013-2014

      2014-2015

      2015-2016

      2016-2017 and so on

       

      Note : My Fiscal period starts from April.

       

      I want to restrict Data always for latest 4 years. I have tried the foll. field

       

      CONTAINS(LEFT([Year],4),STR(YEAR(TODAY())))

      OR

      CONTAINS(LEFT([Year],4),STR(YEAR(TODAY())-1))

      OR

      CONTAINS(LEFT([Year],4),STR(YEAR(TODAY())-2))

      OR

      CONTAINS(LEFT([Year],4),STR(YEAR(TODAY())-3)).

       

      However this will give me problem when Jan 2017 will arrive , since first condition will go wrong and years displayed will only be 3. Please suggest the corrections or what the field should be.

       

      Regards,

      Sanket Deshpande