Substitution variable in a cross-dimensional operator

All,
Essbase doesn't like this:
"Jan"(
("Actuals"->"2011"->"001"->"abc") = ("Run1"->"2011"->"000"->&varAP);
can I have a substitution variable inside a cross-dimensional operator?

The basic construct works for me in Sample.Basic. When you say Essbase doesn't like it, what exactly happens - fails syntax check, errors on execution or just doesn't produce the right results?
Sometimes it's necessary to include quotes in the subvar value itself, e.g. setting your subvar to *"X Y Z"* including the quotes rather than X Y Z.
I would guess you've already tried this, but does the script validate and run successfully if you replace the subvar with the value of the subvar?

Similar Messages

  • Local variables with cross dimensional operator

    Hi,
    I have a business rule, which has the following calculation :
    VAR TOTPROD;
    TOTPROD = "Prod1"+"Prod2"+"Prod3";
    "MBR1" = "MBR2"->"Jan"->TOTPROD/"MBR2"->"YearTotal"->"TotalProducts";
    The above statement does not run for obvious reasons that TOTPROD is not a member name.
    Is there a way to use a local variable in a cross dimensional operator statement?
    I want to use the local variable in order to avoid making an alternate hierarchy.
    I am using Essbase / HPB 11.1.2.2
    Please help.
    Thanks.

    Hi
    As you state, I dont think the approach that you have is going to work.
    What about either
    a. Creating a dummy product member in your outline and place your result on it (or use an existing 'dummy' product member)
    b. Re-write your code to handle what you wish to do....something like (assuming you are adding Prod1, 2 and 3):
    "MBR1" = ("MBR2"->"Jan"-> "Prod1"+"MBR2"->"Jan"-> "Prod2"+"MBR2"->"Jan"-> "Prod3")/"MBR2"->"YearTotal"->"TotalProducts";
    Not sure if I am missing anything here, but do either of these suggestions help?
    JB

  • Outline Order, Calc Script Performance, Substitution Variables

    Hi All,
    I am currently looking in to the performance side.
    This is mainly about the calculation script performance.
    There are lot of questions in my mind and as it is said you can get the results only by testing.
    1. Outline order should be from least sparse to most sparse
    (other reason : to accomodate as many sparse members in to calculator cache) correct me if I am wrong
    2. Is Index entry created based on the outline order. For example I have outline order as Scenarios, Products, Markets then does my index entry be like scenario -> Products -> Markets ?
    3. Does this order has to match with the order of members in FIX Statement of calculation script?
    4. I have 3 sparse dimensions. P (150 members), M (8 members), V (20 members).
    I use substitution variables for these three in the calculation script. And these three are the mandotary things in my calculation script. Now when I see the fix statement, these three are the first 3 parameters of the fix statemtn and since I am fixing on a specific member, placing these three members as the first 3 sparse dimensions in the outline, ill it improve performance?
    In one way, I can say that a member from P, M,V becomes my key for the data.
    Theoritically if I think, may be it will...but in practical terms I don't see any of such thing.. Correct me If my thinking is wrong.
    One more thing, I have a calc script with say around 10 FIX statements and this P,M,V is being used in every FIX statemnts. Since my entire calculation will be only on one P, one M, one V. Can I put everything in one FIX at the beginning and exclude it from remaining FIX statememts?
    5. I have a lot of cross dimensional operations in my calc scripts for accounts dimension (500 + ) members.
    Is there a way to reduce these?
    6. My cube statistics..
    Cube size : 80 GB +
    Block Size : 18 KB (Approx)
    Block density : 0.03 . This is what I am more worried about. This really hurts me.
    This is one of the reason why my calculation time is > 7 hours and some times it is horrible when there is huge amount of data (it takes aound 20 + hours) for calculation.
    I would be looking forward for your suggestions.
    It would be really apprecialble if It is Ok to share your contact number so that I can get in touch with you. That could be of great help from your side.

    I have provided some answers below:
    There are lot of questions in my mind and as it is said you can get the results only by testing.
    ----------------------------You are absolutely right here but it helps to understand the underlying principles and best practices as you seem to understand.
    1. Outline order should be from least sparse to most sparse
    (other reason : to accomodate as many sparse members in to calculator cache) correct me if I am wrong
    ----------------------------This is one reason but another is to manage disk I/O during calculations. Especially when performing the intial calculation of a cube, the order of sparse dimensions from smallest to largest will measurably affect your calc times. There is another consideration here though. The smallest to largest (or least to most) sparse dimension argument assumes single threading of the calculations. You can gain improvements in calc time by multi-threading. Essbase will be able to make more effective use of multi-threading if the non-aggregating sparse dimensions are at the end of the outline.
    2. Is Index entry created based on the outline order. For example I have outline order as Scenarios, Products, Markets then does my index entry be like scenario -> Products -> Markets ?
    ----------------------------Index entry or block numbering is indeed based on outline order. However, you do not have to put the members in a cross-dimensional expression in the same order.
    3. Does this order has to match with the order of members in FIX Statement of calculation script?
    ----------------------------No it does not.
    4. I have 3 sparse dimensions. P (150 members), M (8 members), V (20 members).
    I use substitution variables for these three in the calculation script. And these three are the mandotary things in my calculation script. Now when I see the fix statement, these three are the first 3 parameters of the fix statemtn and since I am fixing on a specific member, placing these three members as the first 3 sparse dimensions in the outline, ill it improve performance?
    --------------------------This will not necessarily improve performance in and of itself.
    In one way, I can say that a member from P, M,V becomes my key for the data.
    Theoritically if I think, may be it will...but in practical terms I don't see any of such thing.. Correct me If my thinking is wrong.
    One more thing, I have a calc script with say around 10 FIX statements and this P,M,V is being used in every FIX statemnts. Since my entire calculation will be only on one P, one M, one V. Can I put everything in one FIX at the beginning and exclude it from remaining FIX statememts?
    --------------------------You would be well advised to do this and it would almost certainly improve performance. WARNING: There may be a reason for the multiple fix statements. Each fix statement is one pass on all of the blocks of the cube. If the calculation requires certain operations to happen before others, you may have to live with the multiple fix statements. A common example of this would be calculating totals in one pass and then allocating those totals in another pass. The allocation often cannot properly happen in one pass.
    5. I have a lot of cross dimensional operations in my calc scripts for accounts dimension (500 + ) members.
    Is there a way to reduce these?
    -------------------------Without knowing more about the application, there is no way of knowing. Knowledge is power. You may want to look into taking the Calculate Databases class. It is a two day class that could help you gain a better understanding of the underlying calculation principles of Essbase.
    6. My cube statistics..
    Cube size : 80 GB +
    Block Size : 18 KB (Approx)
    Block density : 0.03 . This is what I am more worried about. This really hurts me.
    This is one of the reason why my calculation time is > 7 hours and some times it is horrible when there is huge amount of data (it takes aound 20 + hours) for calculation.
    ------------------------Your cube size is large and block density is quite low but there are too many other factors to consider to simply say that you should make changes based solely on these parameters. Too often we get focused on block density and ignore other factors. (To use an analogy from current events, this would be like making a decision on which car to buy solely based on gas mileage. You could do that but then how do you fit all four kids into the sub-compact you just bought?)
    Hope this helps.
    Brian

  • Substitution Variable in Cross Referencing dimensions

    Hi All,
    Can we use substitution variable for cross referencing dimensions.
    Example:
    "Region" = &currmth->&curryear->"New York";
    Thanks in Advance
    Bal.

    Hi John,
    If I use substition variable the answer/value for 'DOM' comes vague. If I hardcode the variables, the values for 'DOM' it comes perfect/accurate.
    Can you please help sir ?
    The Calc script is (Hardcoded value are Sep, FY09,Budget)
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET CACHE HIGH;
    SET LOCKBLOCK HIGH;
    SET AGGMISSG OFF;
    SET UPDATECALC ON;
    SET CREATEBLOCKONEQ ON;
    /* Material Expenses Allocation */
    FIX(&xscenario,&xyear,&xmonth,"NoLocation","NoModel",&xversion,@LEVMBRS("KD PARTS TOTAL",0),@LEVMBRS("VEHICLES",0))
    "DOM" = ("Sep"->"FY09"->"Budget"->"NoRegion"->"InputVersion") * ("Indigenous component cost-Domestic-%"->"REGION"->"ENTITY"->"Budget"->"Sep"->"LOCATION"->"MODEL"->"FY09"->"InputVersion")/100;
    ENDFIX
    Many Many thanks in advance.
    Bal

  • 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.

  • Financial Reports Substitution variable

    Hi All,
    I have a requirement where we need to calculate last 3 months Average workdays(Workdays= workdays in a month ex:Apr=21....). Some other calc's use this data
    We tried to push it to essbase by creating substitution variable threemthsAvg = 21............
    how can i reference this sub var in FR reports.....i cant find this in any dimension

    If the variables refer to a member in the Essbase outline, then it the substitution variables should appear as selections from the member selections in FR studio in the dimensions they represent.
    I don't beleive there is a way to display the value of the variable unless it is a SAP variable (see the "VariableValue" function)

  • Cross Dimensional

    Hi. it is possible to be used with members dynamically in cross dimensional???

    If you are asking can the cross dimensional calc operator (->) be successfully used in a dynamic calc member formula, the answer is yes. If you are asking a different question, please clarify.Todd

  • HSGetValue and substitution variables

    Hi volks,
    is it possible to use the SmartView Hsgetvalue/HSSetValue with substitution variables  like &CurrFC  etc..
    any examples (Syntax) ?
    Thanks in advance
    M

    user11956030 wrote:
    Hello everyone i'm having a little trouble on using define command for a hw assignment.
    Here is what is needed:
    1)Use the DEFINE command to define a variable sal and initialize it to 6000
    2)In the declarative section declare two variables: ename of type employees.last_name and emp_sal of type employees.salary. Pass the value of the substitution variables to emp_sal.
    Here is what i put in and it doesn't work:
    SET SERVEROUTPUT ON
    SET VERIFY OFF
    DEFINE sal=6000
    DECLARE
    ename emp.last_name%TYPE;
    emp_sal emp.salary%TYPE;
    emp_sal = &sal;
    BEGIN
    END;
    Thanks for the help.The assignment operator in PL/SQL is :=, with a colon first.
    Change:
    emp_sal = &sal;to
    emp_sal := &sal;Also, a stand-alone assignment statement like that can not be in the DECLARE section. Put it after BEGIN.
    It is allowed to assign a value when you declare a variable, like this:
    emp_sal emp.salary%TYPE := &sal;but it is not allowed to have an empty BEGIN section. If you want to assign the value in the DECLARE section, then put something (anyhting, at least for now) in the BEGIN section.
    For example:
    DECLARE
         ename     emp.last_name%TYPE;
         emp_sal emp.salary%TYPE          := &sal;
    BEGIN
         dbms_output.put_line (  TO_CHAR (emp_sal)
                        || ' = emp_sal at start of BEGIN section'
    END;
    /= (without a colon) is the PL/SQL (and SQL) equality operator . You can use it in constructions like this:
    IF  emp_sal = &sal 
    THEN
    END IF; Edited by: Frank Kulash on Nov 30, 2009 7:26 PM

  • Can we use Substitution variables in MAXL?

    Hi,
    Can we use substitution variables in MAXL script?
    I have to run this MAXL command for clearing a slice of ASO cube on V11.1.1.3.
    alter database Apname.DBname clear data in region 'CrossJoin({[2009]},{[Dec]})';
    I am planning to use Current_year & Current_month variables instead of hardcoding 2009 & Dec as I have to use this everymonth to clear the current months data.
    If it is allowed, what is the syntax?
    Is there any alternative apart from substitution variables?
    Appreciate your thoughts.
    Thanks,
    -Ethan.

    You would just use ampersand and the variable name instead of the hard coding e.g. &yearVar &periodVar.
    Not tried it on aso clears but in theory it should work as ...'CrossJoin({&yearVar},{&periodVar})';
    just change yearVar and periodVar for your substitution variable names.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Use varialbe as a value in substitution variable

    Hi there,I incrementaly update my cube day by day.And I set a user variable in autoexec.bat to get the current date,eg '2003-06-23'.Could I use such variable as a variable's value in substition variable ?My platform is 6.5 on w2k.Regards,luau

    You can use that in a MAXL script to set the substitution variable.the MAXL script would be something like:Alter database $4 drop variable $5;alter database $4 add variable $5 $7 ;where: $4 is the app.cub $5 is the substitution variable name $7 is the value of the subs. variableRich Sullivan - Beacon Analytics

  • How to use a substitution variable in a load rule?

    I need to use a substitution variable in a load rule in a column, as I will receive a parameter to fix the Month and Year values within the data loading, could somebody tell me if this is possible. I put an expresion "&Yearproc" in the column value but it is not working.

    If you're a member of ODTUG (or even if not, you can sign up for an associate membership for free) you can download Glenn's presentation from 2009 Kaliedoscope "Little Used Features of Essbase (Like Data Mining and Triggers)" -- there is a section in that presentation on substitution variables -- he does a really good job in showing how this works.
    Go to: www.odtug.com, then Tech Resources, then Essbase/Hyperion, and search for Schwartzberg. Currently it's the ninth presentation on the list -- I think this changes based on popularity of downloads.
    Regards,
    Cameron Lackpour

  • Error When Prompting for Substitution Variable

    Hi - I'm receiving an error when I try to run the following using the substitution variable - but only when I enter a string; when I enter a numeric value it runs fine.
    DECLARE
        l_SCR_Info            VARCHAR2(50) := '''SCR'||&SCR_NUM||'-'||'''';
    begin
    dbms_output.put_line(l_SCR_Info);
    end;Here is the error I receive when I supply a string value when prompted:
    ORA-06550: line 3, column 52:
    PLS-00201: identifier 'AB' must be declared
    ORA-06550: line 3, column 27:
    PL/SQL: Item ignored
    ORA-06550: line 10, column 22:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 10, column 1:
    PL/SQL: Statement ignoredCan anyone shed some light on what I'm missing here?
    Thanks!
    Christine

    Hi,
    It looks like you just want one string there:
    l_SCR_Info            VARCHAR2(50) := '''SCR&SCR_NUM-''';Remeber how substitution variables work: SQL*Plus replaces them with values before sending the code to the back end to be compiled.
    If you give a value like AB for the variable, the code you posted is equivalent to:
         l_SCR_Info            VARCHAR2(50) := '''SCR'|| AB ||'-'||'''';by the time it reaches the compiler. AB is not inside quotes, so the compiler looks for a variable or function called AB.
    If you gave a number:
         l_SCR_Info            VARCHAR2(50) := '''SCR'|| 123 ||'-'||'''';there's no problem; the compile knows what the literal number 123 is.

  • 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

  • Problems using substitution variable in Web Analysis

    Dear all,
    I have a Web Analysis report that I need to show a raking table with the current month.
    For that I create a variable in Essbase that is updated with that date (E.g.: varCurrentMonth).
    After that I use it as my substitution variable to filter my date dimension in a report data source (E.g.: Scr5, row: product, column: date dimension & measure):
    2008 (current month)
    Product $ qty.
    AAA 100 10
    BBB 90 7
    CCC 80 5
    The problem is that in our cube we need to use an alias in every dimension not to have duplicate members (E.g.: DT.Date, MS.Measure, PD.Product, etc). And when we use it we need to set up the variable in Essbase using that alias (E.g.: DT.Feb/05/08). And if we use that variable as a substitution variable in the report data source the label displayed is the DT.2008 and not 2008 as expected.
    Does anybody have an idea how to solve that?
    Many thanks,
    Thiago Gabriel

    You usually get this error message if you are trying to assign a value from a sub var to a member that does not exist.
    e.g. trying to put FY08 which is a year member against a period dimension
    or trying to use a sub var of FY09 which does not yet exist in the essbase, so say you added a new year in planning FY09 and used the sub var in the form but have not refreshed the database then it would fail because the year would not have been pushed down to essbase yet.
    or the value of the subvar does not match a member name exactly
    or using a sub var name that does not exist in essbase, e.g. using &nextYear but the sub var has not been created in essbase.
    You can definitely use subsitution variables in columns in the version you are using and prior version.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error with define substitution variable in SQL

    Hi there,
    I am using PL/SQL developer and trying to define a substitution variable as follows:
    define freq = 'Weekly'
    Then later on, in my SQL statement, I used this variable in WHERE statement as follows:
    WHERE ... (&freq = 'Weekly') and ...
    But I got the "ORA-00904: "WEEKLY": invalid identifier" error.
    Where is the problem?
    Thanks in advance!

    I don't know about PL/SQL developer but in sqlplus you need single quotes around the variable.
    SQL> define freq = 'Weekly'
    SQL> select null from dual
      2  where &freq = 'Weekly';
    old   2: where &freq = 'Weekly'
    new   2: where Weekly = 'Weekly'
    where Weekly = 'Weekly'
    ERROR at line 2:
    ORA-00904: "WEEKLY": invalid identifier
    SQL> edi
    Wrote file afiedt.sql
      1  select null from dual
      2* where '&freq' = 'Weekly'
    SQL> /
    old   2: where '&freq' = 'Weekly'
    new   2: where 'Weekly' = 'Weekly'
    N
    SQL>

Maybe you are looking for

  • Migrating to a new Messenger server

    Our current physical mail server, running both GW and Messenger, is a bit long in the tooth. We've migrated away from GW into a unified Exchange-based system, but the GW server is still active for some archival mailboxes that were not migrated for wh

  • Printing from iMac G4 to HP Photosmart 7760 – Colors are heavy on pink side

    Hello~ We have an iMac G4 Flat Panel using OS 10.3.9 and are connected to the HP Photosmart 7760 Printer. When we print directly from our camera card, the printer prints fine. True colors. When we print using any software application, (ie Photoshop,

  • How to automate photslide template in flash 8

    I have flash 8 professional. I am not a html professional, previously i used frontpage 2003 for web creation, and now i dabble with dreamweaver 8 too. I have little html knowledge. I am trying to create a photoslide using the Flash 8 Professional rea

  • Batch Number for Valuation Type in BOM item detail

    Dear PP Expert. Is it possible to maintain batch number for valuation type in BOM item detail ? My requirement is for example in bom item 10, component A is maintained with batch number for valuation type so that in production order batch number fiel

  • Split with Attachments

    Dear All, I would thank you for any help in the following issue. I have split in a process which split the flow of the process to go to 3 users for approvals and each user can add attachments before it submit. The issue is that after the 3 users subm