3 Replies Latest reply: Mar 18, 2014 4:00 AM by Phulsebosch RSS

    First member in range

    Paul Weston

      All

       

      We have a standard Time dimension within Planning with Year, Quarters and months. Months are from Jan - Dec with each level0 member name 3 characters long. We have a substitution Variable FcstPeriods and the value of this will be a range (eg Feb:Dec, Mar:Dec, Apr:Dec etc).

      I am failing on extracting the first member name in the substitution variable. when {FcstPeriods}=Feb:Dec I am looking for Feb. When FcstPeriods=May:Dec I am looking for May.

       

      With the incorrect syntax I am looking to

      FIX (SUBSTRING({FcstPeriods},0,2)

         Process;

      ENDFIX

       

      PLEASE can somebody show me the error of my ways.

       

      Many thanks

       

      PW

       

      EPM 11.1.2.3

        • 1. Re: First member in range
          Phulsebosch

          Hello PW,

           

          I usually put the membernames in quotes, so "Feb":"Dec".

          In our applications we use a shortcut, we have a FcstStartMonth variable. Just to come around this problem.

          Maybe you have also a CurrMonth which you could use with @NEXT.

          I never saw other solutions like @SUBSTRING but maybe with Quotes it recognizes it as a member.

           

          Regards,

          Philip Hulsebosch.

          www.trexco.nl

          • 2. Re: First member in range
            Paul Weston

            Hi Philip,

             

            Glad to hear from you, I hope you are doing well. I've previously seen something like this using concatenate (see code below).....

                VarPart = @member(@concatenate(@name(@parent(@currmbr("Company"))),"_Input"))

                 IF(VarPart+1<>1) /* i.e. not missing or zero */ 

                          statements;

                 ENDIF

             

            I was hoping substring would work. I think I'll use CurrMonth with @NEXT.

             

            Many thanks for your help

            Paul W

            • 3. Re: First member in range
              Phulsebosch

              Hi Paul,

              I never know who is the person behind the number. Nice to hear from you.

              Yes the additional variable will do. You have to update them anyway when a new cycle starts. One more there, reduces a lot op headache and possible errors at another place.

               

              Regards,

              Philip

               

              pls. close the question.