Substitution Variable & its usage in formulas

Hi, I have a requirement of using Substitution variable ,say "CurMonth" in the formula for @PTD("JAN":&CurMonth). If I can be able to do this then I can update my substitution variable every month & then change the value in the PTD function using the substitution variable. My question here is whether substitution variable can only be used in calc scripts & not in formulas , if so why & is there any way my requirement can be met. Your ideas & solutions appreciated very much. Thanks & Regards

Substitution variables cannot be used in the outline - only in a script. If you want to be able to use the function in a member formula, you will either have to hard-code the month range, or tag the proper months with UDAs, and use the @UDA function to select them. That way, you can just change the UDA's every month rather than the formula, but the change will be an equal amount of work for either solution.If you don't mind using a calc script, you can use a sub variable, but you won't be able to make it dynamic calc as you would a member formula.Hope that helps.Regards,Jade------------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

Similar Messages

  • Substitution Variable problem in member formula

    I'm using the following member formula for a member in a sparse dimension - Scenario.
    @VAR("Actual",&PO_PriorLE->"Final");
    I can get this to validate in Essbase, but when I try putting it into Planning, the refresh to Essbase bombs and the formula will not validate in Planning.
    Version - 9.3.1
    Thoughts?
    Regards,
    Paul
    Edited by: penglish on May 27, 2009 3:20 PM

    Hi,
    I have just tried it on 9.3.1 patch 10 and had no problems.
    I take it the member assigned to &PO_PriorLE already exists ?
    Have you tried replacing the substitution var for the real member name in the formula.
    What is the error message when you try and validate?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem in taking correct Substitution variable in MDX Formula

    Hi,
    We have MDX Formula which takes Substitution Variable as input . Previously we used Hyperion Essbase 9.3.1.3 version and working fine currently we upgraded to 11.1.1.3 version After Upgrade this formula is not taking correct updated value. Its taking previously updated value . To Take the Correct value we are bouncing the Essbase Services then only new Formula is picking the latest Updated value. This is happening only for one formula and rest everything is working fine. Can you please tell us is there any bug or where is the problem is ?
    Thanks,
    Naresh.

    The Database Administrator's Guide and the Essbase Technical Reference are available through the documentation portal:
    http://download.oracle.com/docs/cd/E17236_01/nav/portal_3.htm
    Both the Database Administrator's Guide and the Technical Reference are searchable on an exact phrase, to find the source of the extract John provided.
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/dotcreat.html#dotcreat1053369
    See section "Setting Substition Variables".

  • Adding Formulas to Substitution Variables

    Hi All,
    I am using EPM system 11. I have a classic planning application . On my dataform , I have Year in the Point Of View and Period on Column.
    I need to show Current Year,Next Year and Current Month (derived from system date) on the form.
    For achieving this I created three substitution variable in EAS *&CurYear,&NextYear,&CurMonth.*
    Say e.g if the System date is *10th October 2009* then CurYear would show FY09 , NextYear would show FY10 and CurMonth would show Oct.
    For the time being , I hardcoded these values..but I am trying to get through a way of deriving the above values from system date
    Can somebody please advice how i can proceed to get the variables to work ....
    Kind Regards.
    Mirka

    Hi,
    How about something like
    SET year=FY%DATE:~8,2%
    SET month=%DATE:~3,2%
    *:: Remove leading zero if it exists...*
    set /a month=1%month% - 100
    set monthstring=Jan@Feb@Mar@Apr@May@Jun@Jul@Aug@Sep@Oct@Nov@Dec
    for /f "tokens=%month% delims=@" %%j in ('echo.%monthstring%') do (
    set month=%%j
    echo %month%
    echo %year%
    Say the year is 2009, this would set year=FY09
    And month should be converted to a month name
    ok?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Unable to execute the substitution variable in calc scripts in essbase 11.1

    Unable to execute the substitution variable in calc scripts in essbase 11.1.3
    FIX(&CURRVERSION,COLA)
    Unit=units*Listprice;
    dataexport "file" "," "E:\NEW.TXT";
    ENDFIX
    Error: 1200471 Error parsing formula for FIX STATEMENT (line 1): expression expected before [)]
    This is error it throws when executing the calculation script
    I wonder whether its a problem with substitution variable i want to know wat went wrong inside the fix statement
    I have created substitution variable use maxl
    Installed the essbase in custom manner and standlone mode nt register with the shared services ,
    Is this problem with the custom installation of essbase
    Regards
    shenna

    If you remove the substitution variable and replace it with the actual value (whatever that is), does the code work? That will tell you if the issue is around the substitution variable or not.
    John -- First you race Glenn, then you race me -- and you always win. :)
    Regards,
    Cameron Lackpour

  • Substitution variable - Problem

    The requirement is to have numeric value to a substitution variable. In essbase there is a provision to set numeric value to a substitution variable . i tried out the below one its not working.
    Create a sub variable and assigned value "12" and tried using the same sub variable in the MDX query but getting error. kindly let me know is it possible to set a numeric value to a sub variable and use the same in MDX formula. Any help would be greatly appreciated.
    I have seen this note in dbag :
    If a substitution variable value is numeric, different rules apply for how you enter the variable:
    If it is not used in MDX statements, enclose a substitution variable value in quotation marks; for example, if the variable name is Month, and its corresponding value is 01 (corresponding to January), place quotation marks around 01 (“01”). Substitution variables usually are used with block storage databases; they are not used in MDX statements.
    If it is used in MDX statements only, such as in formulas in aggregate storage outlines, and the value is numeric or a member name, do not enclose the value in quotation marks.
    Note:
    If a substitution variable value is numeric or a member name starting with a numeral or containing the special characters referred to above is to be used both in MDX and non-MDX situations, create two substitution variables, one without the value enclosed in quotation marks and one with the value in quotation marks.

    i got the way to do

  • Conditional suppression using substitution variable in Hyperion financial r

    Hi all,
    Is there a way that I can suppress a column using substitution variable in hyperion financial reporting?
    For eg, i want to suppress the column if the value of the substitution variable curr_mnth = jun.
    Is there a way to do this? In conditional suprression dialog box, I dont find this option.
    Please suggest.
    Your response is appreciated.
    Thanks,
    Sirisha.

    Hi Sirisha
    In my earlier reply I think I may have mislead you as I thought that you could set the member name equal to that in a row/column and I've managed to get into a HFR studio session this morning and realised that the conditional suppression only allows you to suppress where member name = 'XXX' (specific text) so that doesn;t meet your requirement.
    Different people will have different ways of achieving what you want and everyones requirements are different. If it helps my preferred way of conditionally suppressing periodic data (for Planning/Essbase) is to add a dynamic calc account member called 'TP-Index' into the database, set up a formula so that each period returns a numeric value from 1 to 12 to match the fiscal/calendar year as required.
    Then in reporting bring the account and period dimensions into rows/columns so that you are able to retrieve data for the TP-Index account and the period as defined in your substitution variable. You can then choose how the suppression works based on a numeric value, commonly you may want to suppress if greater than, e.g. you have a multi-period report where your actual data is to June so you want to suppress everything from July onwards.
    I'm sure that a similar thing could be achieved in HFM as well if that is your underlying system instead of Essbase.
    Does that help?
    Stuart

  • Using substitution variable in sql -- Issue

    Hello All
    I am trying to do a sql operation from command prompt of my system and that sql requires substitution variable which i am passing it but when i pass the variable ( there are two) the first one assign as " \c" and second gets both what i am passing.
    I am not sure what exactly happening here, i have done this on AIX but here its not working any ideas?
    System : uname -a
    Linux ## 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

    AIX and Linux are not the same. An output of "\c" may indicate a compatibility issue of your shell script with your current command line interpreter (shell). A \c can be used to suppress a newline with the echo command. Bash understands both formats echo -n and echo \c, but other shells like Ksh don't. Try to run your script under a Bash, which is the default under Linux. If the problem persists you will need to post your script for any further analysis.

  • Peculiar problem with Essbase (Calc Script) - substitution variable / UDAs

    This is odd but I have a script like :
    VAR iloop=1,break=0;
    FIX(<required POV>)
    Loop (20,break)
    VAR Country_total1,Country_total2,Country_total3;
    FIX (@UDA(Entity,@ALIAS(@CONCATENATE("&Country",iloop)))) // &Country1, &Country2 - are substitution variables with UDAs stored as strings
    Statements;
    /* +<statements for calculating total values.. for that country and stored against variables>+ */
    Country_total1=Country_total1+ +<Calculation>+
    ENDFIX
    /* Second part : Now again the calculations stored in the variables are to be stored against specific entities */
    FIX (@UDA(Entity,@ALIAS(@CONCATENATE("&Country",iloop))))
    FIX(@ISUDA(Entity,<Check1>)
    ..... Assign to relevant account
    ENDFIX
    ENDFIX
    ENDLOOP
    ENDFIX
    Now the problem is that the first fix statement works just fine, but the FIX statement in the 'second part' throws an error
    Error: 1200354 Error parsing formula for [FIX STATEMENT] (line 66): expected type [STRING] found [EXTVAR] ([iloop]) in function [@CONCATENATE]
    If I hard code the 'second part' FIX statement to the substitution variable directly - it works just fine.
    How can the first statement work and not the second one ? They are exactly the same.

    Glenn, thanks - I hadn't thought of that :).
    But it still does not entirely solve my problem (please see my previous post depicting a requirement similar to ours )
    - We have lots of countries (50-60+ might be much more) and each country can have multiple entities (3-4 on an average - can go unto 7-8)
    - so good guess would be around 200 entities
    - So say I have to do it for 2 countries only (two entity types). Then I need 4 variables - 2 for each country ('country 1 ET1 total', 'Country 1 ET2 Total')
    When the list is 20 counties - variables become 40 :(.
    - Still leaving aside the 40 variables for a bit -
    There are subsequent steps of calculations which needs to be done based on these totals (which are exactly the same for all countries) - just that we need the correct totals to begin with and the rest is already stored in the DB
    So since I have a different variable for each country - I cannot write one single calculation block to use the variables sequentially one by one (can I ?)
    I might have to write a separate calculation block for each of these countries. (20 separate blocks)
    That's what I was trying to avoid and simplify with the substitution variable (but is not working)
    - Create substitution variables - which would store the alias of the required countries (2/10/20 as many required)
    - Loop through these substitution variables - using them one by one
    - So I just need one single block of calculation with all the variable in the calc script being reused after each country calculation is done
    - and the user need not go into the script, as the only thing that will change are the countries. And he can change it easily through the substitution variable.
    Edited by: Ankur on Jun 27, 2012 12:53 PM

  • Problem with my substitution variable.

    My substitution variables don't prompt properly now. It worked fine before, but I don't know what I did to it. Here is the test code:
    set define on;
    connect sys/&sysPassword @&instanceName as sysdba;
    execute dbms_output.put_line('this is a test');
    When I tried to execute above lines in sqlplus, it didn't prompt anything, but got following result instead:
    SQL> set define on;
    SQL> connect sys/&sysPassword@&instanceName as sysdba;
    Enter value for syspassword: execute dbms_output.put_line('this is a test');
    Enter value for instancename:
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SQL>
    I remember when I used substitution variables before in sqlplus worksheet, it popup a dialog for input, but it doesn't anymore.
    Any ideas about this issue? Or what setting could affect the behavior? Thanks in advance.

    It would work only if you put these set of statements in a .SQL file and run that file at SQL*Plus prompt:
    SQL> @the_sql_script_created_above.SQL

  • Problem setting the value of a substitution variable in a calc script

    Hi, All.
    I'm trying to update the value of a substitution variable inside an IF statement and I'm having trouble.
    Here's the code:
    *"Jan"(*
    IF  (LoopCounter = 1) &varEntity = "100";
    ENDIF;)
    the error I get back from EAS is:
    Error: 1200336 Error parsing formula for [Jan] (line 54): [(] without [)]

    I know CL knows a lot about HBR, if he's around today... LOL
    As a matter of fact, I just used an HBR (not using Calc Manager till I have to)'s macro functionality to drive fx for different Scenarios in a Planning app. Here's how I call the macro:
              /*     Call the macro mcrFxCoreOutYears for the four fx rate types for ALL 12 months of the year.     */
              FIX(&BudYear)
                   %mcrFxCoreOutYears(Constant)
                   %mcrFxCoreOutYears(Comparable)
                   %mcrFxCoreOutYears(Estimate)
                   %mcrFxCoreOutYears(Actual)
              ENDFIXI pass the Scenarios Constant, Comparable, Estimate, and Actual to the macro mcrFxCoreOutYears. You can apply HBRs against Essbase.
    I believe (I can't remember what exactly -- is it that templates don't accept parameters? That seems hard to believe. Looking at a CM template, that does seem to be the case. Bummer if I'm right.) that Calc Manager BRs have less functionality wrt templates, but I haven't worked with CM for over a year.
    It works really well -- a single place to maintain code and no appreciable performance cost.
    You cannot launch a HBR from a MaxL script but HBRs can be launched from command lines -- this may constrain where you place your automation (it basically has to run off of whatever the EAS server is. You may end up shelling out of MaxL to execute the HBR or even execute scripts across servers -- that does get more complicated.).
    Anyway, if you have any more questions, ask away -- it really is a very powerful component. I will have to look at CM more closely (sooner or later I will lose the HBR vs CM argument and at least need to know if templates support parameters) to see if I'm right on what I wrote above.
    Regards,
    Cameron Lackpour
    P.S. You cannot define an ARRAY in an HBR macro because ARRAY arrayname[value] gets read as a parameter. I ended up declaring the array in the calling HBR.
    P.P.S. I really need to write up the fx approach in a blog post -- it is wicked fast and really easy to use. Too many other posts in the queue already.
    Edited by: CL on Aug 24, 2011 1:48 PM

  • Substitution variable using in rules file

    Hi,
    I have a requirement to load the data only for the current month. But, my source file is having data for all the months till current month.
    ex: I have to load data for MAY. But, source file is having data from JAN to MAY
    Its a monthly process and it should load the data only for the current month using substitution variable.
    Means next month I will be having JAN to JUN data. But, I should load only JUN data.
    Could any one help in building rules file for this requirement.
    Thanks
    Sri

    Is the data coming from SQL or a flat file?  And is JAN through MAY represented in multiple columns or multiple rows?
    As Evgeniy says if it's a SQL source, you can use a subvar in the SQL statement.  If it's a flat file (and your periods appear as multiple rows) you can use a subvar in a SELECT/REJECT criteria.
    Honestly though, if a feeding system is producing a flat file for you, I would try and arrange to have the flat file contain only the data that is actually required.  Parsing a file that is up to 12 times larger than necessary is inefficient.

  • Substitution variable in sql load rules file

    Okay gurus,
    I need a little guidance, I have to replace the value of 201020 and 2008 from substitution variables. I have created the variables and set them up globally on the essbase server.
    201020 = FW00
    2008 = FY00
    WHERE ACT.FISCAL_WEEK_ID <= 201020
    AND ACT.FISCAL_YEAR_ID > 2008
    AND RTDIV.DIV IN (1,2,3,4,5,6,7,8,9,99) (This is the query with hard coded values of week and year)
    When i m trying to put sub variables there , its throwing the error. please find below the way i was trying to do it.
    WHERE ACT.FISCAL_WEEK_ID = '&FW00'
    AND ACT.FISCAL_YEAR_ID = '&FY00'
    But unfortunately, its throwing error Error: 1021001 Failed to Establish Connection With SQL Database Server. See log for more information
    I know that this is the generic error because if i put the hard coded value in sql load rules it works fine.
    Is it the right way to out sub var in sql load rules???
    Please advice and thanks in advance.

    Hi Genn,
    I tried to see the app log for sql but i m afraid that there is nothing in there, the only error message which I am getting in app log is this:
    Failed to Establish Connection With SQL Database Server. See log for more information
    Its an ASO cube and initially i was using the variable as FY00 AS "2008" it did not work and than i tried without quotes in variable but is still not working.
    Any idea..thanks in advance.

  • Substitution variable in Dynamic Calc

    Hi,
    We are using Essbase 9.3.0 on Windows and are seeing this behavior in our BSO cubes.
    When we use a substitution variable in a Scenario member with Dynamic Calc (not store) setting, after the first retrieve, if we change the value of the substitution variable, the subsequent retrieves do not generate updated results.
    I suspect that the value is cached in the Dynamic Calculator Cache, and for some reason does not track changes in Substitution Variables to know that the value must be re-calculated. Here is what I see in the Application log -
    [Mon Aug 09 10:31:51 2010]Local/App1/db1/user1/Info(1020055)
    Spreadsheet Extractor Elapsed Time : [0.032] seconds
    [Mon Aug 09 10:31:51 2010]Local/App1/db1/user1/Info(1020082)
    Spreadsheet Extractor Big Block Allocs -- Dyn.Calc.Cache : [4] non-Dyn.Calc.Cache : [0]
    This says that 4 blocks were used from the Dynamic Calc Cache, and none from outside it. Does this mean that existing blocks were read and not re-populated?
    If I make a change to the formula, wherein I hard code the value of the sub var and perform the retrieve, then the value is updated. Subsequent retrieves, after restoring the formula still returns the updated results.
    My question is, is this expected behavior? Or am I doing something /reading something wrong?
    Thanks,
    Andy

    when a subst variable value is changed... to use the value in member formula or calc script, the concerned application has to be restarted...
    - Krish

  • Substitution Variable in DataForm

    Hi All,
    I am using EPM 11.1.1.1.0.
    I am trying to define a member formula for a scenario.
    The formula has a substitution variable in it.When i validate the formula it gives me the following error:
    *Substitution variable [CurMonth] doesn't exist.*+
    Is it that the use of substitution variables is not supported in Member Formulas or am i missing a step to help it recognize the variable...
    Please advice.
    Regards
    Alicia

    Is this an EPMA app, or a Classic app? Is the validation failing in the dimension library of EPMA?
    If it's an EPMA app, variables like this are now maintained in Calc Manager. Go to "Administer", "Calculation Manager". Then select the menu options "Tools", "Variables". Expand your Planning application and you'll see any variables defined for that application listed. If you right-click on the app or database, you can select "new" to create a new variable. Select a type of "Essbase" to create a substitution variable. You'll need to deploy the app before the variable will show up in Essbase.
    Hope this helps,
    - Jake

Maybe you are looking for