3 Replies Latest reply on Mar 18, 2014 9:00 AM by Phulsebosch

    First member in range

    Paul Weston



      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)




      PLEASE can somebody show me the error of my ways.


      Many thanks





        • 1. Re: First member in range

          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.



          Philip Hulsebosch.


          • 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 */ 




            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

              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.





              pls. close the question.