Need Calc Script Desperately!

I have no idea how to create these and have spent too much time searching online.  I need a calculation script for Text Field 33 x 50%...

Place this code as the custom calculation script of the field in question:
event.value = this.getField("Text Field 33").value * 0.5;

Similar Messages

  • Need calc script help....

    i have a cube which used to take more than 2 hrs to refresh (mbr + data load + calc time)
    A dim name Version used to be as DENSE earlier and i changed it to Sparse..
    no it takes less than an hour to build...
    but one of the calc script is not working completely....
    in that calc script there are some IF conditions where i check for the current month and for each month i do different calculations
    but now i dont know why ...the calc is going to the JAN calc part even though the curr mnth is NOV in my cube...
    Can anyone help me with this issue???

    fix(Entityx)
    fix(("Fcst"))
    fix(geo)      
    "FTE Amount"(
    IF(@UDA("Period","CurrMth") == "Mar" or @UDA("Period","CurrMth") == "Apr" or @UDA("Period","CurrMth") == "May")
    "Jan"->"FTE Amount" = 10;
    Feb"->"FTE Amount" = 10;
    so on till dec.
    elseif(@UDA("Period","CurrMth") == "Jun" or @UDA("Period","CurrMth") == "Jul" or @UDA("Period","CurrMth") == "Aug" )
    "Jan"->"FTE Amount" = 20;
    Feb"->"FTE Amount" = 20;
    so on till dec.
    elseif( @UDA("Period","CurrMth") == "Jan") or ( @UDA("Period","CurrMth") == "Feb") )
    "Jan"->"FTE Amount" = 30;
    Feb"->"FTE Amount" = 30;
    so on till dec.
    elseif( @UDA("Period","CurrMth") == "Sep" or @UDA("Period","CurrMth") == "Oct" or @UDA("Period","CurrMth") == "Nov")
    "Jan"->"FTE Amount" = 40;
    Feb"->"FTE Amount" = 40;
    so on till dec.
    elseif( @UDA("Period","CurrMth") == "Dec" )
    "Jan"->"FTE Amount" = 50;
    Feb"->"FTE Amount" = 50;
    so on till dec.                    
    endif;)               
    endfix;
    endfix;
    endfix;
    my currmnt is NOV....but i get values as 10 which should be the case when currmnt is mar or apr or may...
    i even checked by individual IF's like IF(mar) do this....if(apr)....do this...
    then its going to MAR... i dont know why..
    CAn u help ??

  • Need a calc script

    for me data comes to a parent level .its just above the leaf members.
    now i need to push the same data which is at 1 level above to the leaf members to all the members under the parent.
    i am not able to find out a way to write a script to that...i am new to calc scripts.
    can anyone please help me out.

    i tried with alloc....
    FIX("entity")
    "F"= @ALLOCATE (entity->F,@CHILDREN ("entity"),"F" , ,subtract);
    ENDFIX
    initailly i have 0 at F i mean a->F ("a" is child of Entity) so my logic was....
    it takes value from entity->F and subtracts value from F which is 0 and sets it to F(a->f)
    so its just like giving the value of entity->f to entity's children.
    it worked fine.
    but the problem was when i did default calc first and then tried this formula its not working
    i did default calc first because i dont want the values from entity to roll up .
    i dont know why its working before default calc and not working after dafault calc.
    can anyone help me with this.??

  • Need help in solving complex Calc Script

    Gurus
    I am working on a calc script which involves complex calculations. I got struck at the following. Please help me with your ideas...
    we have 4 dimensions and values for some of their members as follows.
    --------------------------------------------------------Dim3.mem1->Dim4-----------------Dim4.mem1->Dim3
    Dim1.mem1->Dim2.mem1-------------------------------0.6---------------------------------------100
    Dim1.mem1->Dim2.mem2-------------------------------0.6---------------------------------------200
    Dim1.mem1->Dim2.mem3-------------------------------0.6---------------------------------------300
    Dim1.mem1->Dim2.mem4------------------------------#MI---------------------------------------400
    Dim1.mem2->Dim2.mem1-------------------------------0.6---------------------------------------500
    Dim1.mem2->Dim2.mem2-------------------------------0.4 --------------------------------------600
    Dim1.mem2->Dim2.mem3-------------------------------0.4---------------------------------------700
    Now I want to add only particular values of the second column. For example all the values whose respective value in first column are equal.
    so here it is
    Value1=100+200+300+500(because 0.6 is common and different from 0.4/#MI)
    Value2=400(because #MI is common or different from 0.6/0.4)
    Value3=600+700 (because 0.4 is common and different from 0.6/#MI)
    Like this we have so many members in all the four dimensions.
    Thanks in advance.
    MP

    Gurus
    I am working on a calc script which involves complex calculations. I got struck at the following. Please help me with your ideas...
    we have 3 dimensions and values for some of their members as follows.
    -------------------------------------------------------------Dim3.mem1---------------------------Dim3.mem2
    Dim1.mem1->Dim2.mem1-------------------------------0.6---------------------------------------100
    Dim1.mem1->Dim2.mem2-------------------------------0.6---------------------------------------200
    Dim1.mem1->Dim2.mem3-------------------------------0.6---------------------------------------300
    Dim1.mem1->Dim2.mem4------------------------------#MI---------------------------------------400
    Dim1.mem2->Dim2.mem1-------------------------------0.6---------------------------------------500
    Dim1.mem2->Dim2.mem2-------------------------------0.4 --------------------------------------600
    Dim1.mem2->Dim2.mem3-------------------------------0.4---------------------------------------700
    Now I want to add only particular values of the second column. For example all the values whose respective value in first column are equal.
    so here it is
    Value1=100+200+300+500(because 0.6 is common and different from 0.4/#MI)
    Value2=400(because #MI is common or different from 0.6/0.4)
    Value3=600+700 (because 0.4 is common and different from 0.6/#MI)
    Like this we have so many members in all the four dimensions.
    Hope this one is clear..
    Thanks in advance.
    MP

  • @ATTRIBUTESVAL works properly in Calc script but not in Member Formula.

    We are using Essbase 11.1.2 –
    "Global_Period" is a Dynamic Calc Member. Below is its Member Formula:
    "ProjType " is an attribute (text) dimension.
    "Global_Period" ="ValidAccount";
    IF (@ISLEV ("Total_Expenses", 0) AND @ISMBR("HSP_InputValue") AND @ISLEV ("Version",0) AND
    @ISMBR("No_GL_Account") AND @ISLEV ("Scenario",0) AND @ISLEV ("Years",0) AND @ISMBR ("Local")
    AND @ISLEV("Tot_Org",0) AND NOT @ISIDesc ("Service_Division") AND @ISLEV("Tot_PRJ",0) )
    "Global_Period"->"No_GL_Account"-> @CURRMBR ("Projects") =
    1* "ValidAccount"->"Global_Version" ->"Global_Scenario"->&Budget_Year->"Global_Entity"->
    "No_GL_Account"->"HSP_InputValue"->"Local"->
    @MEMBER(@NAME(@CONCATENATE ("Proj_",@ATTRIBUTESVAL("ProjType"))));
    ENDIF
    The above Member- Formula is failed to work when opening a Data Form that contain "Global_Period".
    The error messages in the log file are as follow:
    [Thu Mar  1 16:55:39 2012]Local/Projects/Plan1/admin@Native Directory/1122748736/Error(1200370)
    Error executing formula for [Global_Period] (line 1): attempt to cross a null member in function [@X]
    [Thu Mar  1 16:55:39 2012]Local/Projects/Plan1/admin@Native Directory/1122748736/Error(1200370)
    Error executing formula for [Global_Period] (line 0): attempt to cross a null member in function [@_VAL]
    When converting the "Global_Period" to be a Store member.
    The Calc Script below is exactly equivalent to the Formula, and run perfectly with no Errors.
    "Global_Period" ="ValidAccount";
    FIX ("HSP_InputValue", "Local","No_GL_Account", @RELATIVE ("Total_Expenses", 0),
    @RELATIVE ("Version",0), @RELATIVE("Scenario",0), @RELATIVE ("Years",0),
    @REMOVE (@RELATIVE ("Tot_Org",0),@IDESCENDANTS ("Service_Division")),
    @RELATIVE ("Tot_PRJ",0))
    SET CREATENONMISSINGBLK ON;
    "Global_Period"
    ("Global_Period"->"No_GL_Account" -> @CURRMBR ("Projects")=
    1* "ValidAccount"->"Global_Version" ->"Global_Scenario"->&Budget_Year->
    "Global_Entity"->"No_GL_Account"->"HSP_InputValue"->"Local"->
    @MEMBER(@NAME(@CONCATENATE ("Proj_",@ATTRIBUTESVAL("ProjType"))));
    SET CREATENONMISSINGBLK OFF;
    ENDFIX
    For many reasons we prefer to use the Dynamic Calc Formula for "Global_Period".
    As result of some checking I discover that the problem is with the function @ATTRIBUTESVAL,
    because the formula has worked fine when I replace the @ATTRIBUTESVAL with a string.
    Please help, what is the right way to write the formula in order to make it work.
    Thanks
    Tami Kedem

    Dear Cameron Lackpour,
    Thank you very much, for your reply.
    I'd given it a try, but it didn't help.
    The purpose of this formula is as follow:
    We holds 1's (ones) for allowable combinations of "Project_Type and Accounts", namely, each project type has different list of accounts that are allowed for input.
    I need to populate the input 1's to all projects (and their children) according to its "ProjType".
    The Data forms has periods in columns, thus by putting "Global_Period" (Hide) as the first column, and use "Suppress Missing rows" - for each project (on the "Page") , the form will show just the allowable Accounts in rows.
    (we have around 300 Accounts, 50,000 members in Project dimension and around 25 Types of projects).
    Please help.
    Thanks!
    Regards,
    Tami Kedem

  • Assigning a value to a constant in Calc Script

    Hi All,
    I'm trying to assign a value to a constant in a calc script, but not able to make it work.
    I need to get a user entered value from the database such as Indexation Value, and use that many times in my script. Rather than use:
    "member1"->"member2"->"member3"->"member4"->"member5"
    every time I access the value, I'd like to use:
    VAR IndexVal = "member1"->"member2"->"member3"->"member4"->"member5";
    and then use IndexVal in the script.
    Is this possible?, or do I have to use a substitution variable?
    Thanks.

    It is possible, but the variable and the calculations that use it must exist in the same Calc Bloack statement (Beginning and ending in parens)

  • 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

  • Automate the process of changing the subvariables in Essbase calc script?

    Hi Experts,
    I have two calc scripts called HourlyAgPre & HrlyAgPost and in these calcs I am using Subvariables. Like wise i have 4 regions and there are so many calc scripts. during month end close i have to go and change the subvariables manually. is there any way to change the subvaribles at one time using Maxl script?
    Eg:
    In BD9 My subvariable needs to point to Preclose
    In BD-3 my subvaribles need to poit to Postclose.
    Please suggest me if you come across this?
    Thanks in advance.

    Hi,
    Here is example of setting variables through Maxl and passing parameters into the maxl script Re: Update variables
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Use of RTP in calc script

    Hi,
    Can anyone please let me know if run time prompts can be used in calc scripts? Actually, we need to have some aggregation at a particular scenario, division and month level in essbase.
    We are using 11.1.1.
    Thanks.

    Runtime prompts are for use with Business rules (either original business rules via EAS or Calc Manager) and not essbase calc scripts.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Essbase 9.3 Calc scripts. Pb with dates. How to convert (string = number) ?

    Hello,
    I've a problem with Essbase(Planning?) Scripts on version 9.3. It looks simple but I do not find any (clean) solution :
    On my Essbase database, I have a member called "Reference_Date" on my axis Indicators. It is a date data type, that is to say, it displays a number corresponding to a YYYYMMDD format. For example : 20091029 for October 29th 2009.
    In calc scripts I often need to compare the month included in that "Reference_Date" with the current Member of my Time Axis (I have 12 Months members based on the format M02 for February for example). The final aim is to calculate a number of complete years since that "Reference_Date".
    But theses two elements are not of the same "type" (one is a number value and the other is a "member" in Time Axis). So I'm forced to convert one of this two elements in order to compare it.
    For example I can extract the month value of the "Reference_Date"' and put an "M" before it to have a Time member equivalent or I can convert the member Name M10 to a number (10))
    in both cases I have the same type problem : I don't know how to convert a string into a number nor how to convert a number into a string.
    (For example @CONCATENATE doesn't work with numbers). and that my only remaining problem.
    I didn't find any Essbase Function which do this (conversion number <=>string).
    Is anyone have an Idea ?
    Thanks for your help
    Best regards

    I don't know any way for you to compare your data against your metadata. Not directly. To me it makes little enough sense to try that I'm not surprised the developers didn't provide for it.
    I've converted member names to strings, manipulated the strings (calc script functions are not good at this), and turned them back into member names, but that's really the only use I've had for string manipulation. I don't think an equivalency operator even exists for string data. And I see no way to begin thinking of a member name, once converted to a string, as a number.
    It makes even less sense to me to try thinking of a data value as a string. Even text values in Sys 11 are stored as numbers. Not encoded characters, but just a number to look up somewhere.
    I think you can do what you want though, with something like this...
    IF (@ISMBR("FY08"))
    vYr = 2008;
    ELSEIF (@ISMBR("FY09"))
    vYr = 2009;
    ENDIF;
    IF (@ISMBR("M01"))
    vMth = 1;
    ELSEIF (@ISMBR("M02"))
    vMth = = 2;
    ENDIF;
    "Years_Since_Reference" = ((vYr * 100) + Mth) - ("Reference_Date" / 12);
    Obviously, the math will need some work, coz that doesn't actually work, but the logic above essentially turns your metadata into numbers, which is what you are after.
    Good luck,
    -- Joe

  • FDM Cannot Access Calc Script

    We use FDM to load data to Essbase and then run a script after export to Aggregate the data using Vlaidation Entities in FDM. We wrote a new Agg Script and so I changed the Validation entity from CalcALL to CALCCMA and now I get the below error.
    Error: Essbase API Procedure: [EsbCalcFile] Threw code: 1030214 - 1030214 - [Tue Aug 03 13:25:25 2010]XXXXX/PLANNING/IncStmt/admin/Error(1030214)
    User [admin] cannot access calc script: CALCCMA
    The script is in the same folder as the old one. What is also strange is that when I try to change back the Script to CalcALL in the FDM valdiation entity I get an error as well. I checked all the integration settings and they are correct. I checked every script in FDM and asearched the adapter XML and found no references to the CalcALL script. I can't figure out where else the script would be referenced in FDM or if I need to change something on the Essbase side.

    I just read the ReadMe and here is the relevant part:
    Essbase Security Requirements
    Some FDM tasks require the user to have certain security privileges for Essbase. The following table outlines the tasks and Essbase privileges required.
    Perform a consolidation (assigning a Validation Entity to the FDM location).     
    Add Calc privilege (ESB_PRIV_CALC) to the active database
    I'm assuming I will need a DBA to check this. The funny thing is that this was working before perfectly fine and then I changed the script in the validation entity and got the error. When I changed it back to the original script that worked I recive the same error. I was not involved in the implementation so I don't know how this was set up.

  • Execute Calc Script from another application

    Hello Guru's,
    i have two applications (Planning and HPCM). Both 11.1.1.3.
    I write a calc.script in HPCM (with XREF) that provide me a data from Planning to HPCM. Now i am trying to execute a script in planning. So that a planning user can load the data by clicking a business rule.
    Is it possible?
    Many thanks,
    WhiteBaer

    VB is a system wide scripting engine, so you can run it from outside InDesign. You create an InDesign object to address InDesign. This can be done by another application as well.
    Javascript is a scripting engine provided soley by InDesign. Unless you have some method of telling InDesign to run the script, it's a non-starter. You can probably create a dll to tell InDesig to run a javascript, but I think a simple VB is WAY simpler...
    All you really need to do is write a very short VB and feed the javascript to the VB as a string anc call app.doScript() providing the javascript to the doScript method.
    HTH,
    Harbs

  • Call ODI 11g scenario from Essbase calc script/business rule using ODI SDK

    I am looking for any hints on how to use the ODI 11g SDK. I want to call a java application (CDF) that runs an ODI scenario using RUNJAVA in Essbase which I have successfully done in the 10g environment.
    The java application has the odi-core.jar included in the project and registers OK with Essbase and I have replicated code from the Oracle sample code site. When I run the application in a calc script I get the following error:
    EssbaseCluster-1.EFTS.EFTS.odi     Execute calculation script     June 17, 2011 10:20:40 AM NZST     Failed
    Error: 1200456 Problem running [indigo.essbase.odi.RunODIScenario]: [java.lang.NoClassDefFoundError: org/springframework/util/StringUtils]
    When I comment out the code that calls the creates the OdiInstance then the java app executes fine - i.e. writes something to the Essbase log.
    The research I have done so far indicates that a classpath is incorrect. If that is the case where do I start looking to correct the classpath? Is it the ODI classpath or the Essabase classpath?
    Any tips would be grateful.
    Thanks.

    You need to import more jars to execute this
    following are the jars
    1)     bsf.jar
    2)     bsh-2.0b2.jar
    3)     commons-collections-3.2.jar
    4)     eclipselink.jar
    5)     odi-core.jar
    6)     ojdl.jar
    7)     oracle.ucp_11.1.0.jar
    8)     persistence.jar
    9)     spring-beans.jar
    10)     spring-core.jar
    11)     spring-dao.jar
    12)     spring-jdbc.jar
    Once you have this in classpath - your scenario will execute
    Hope this helps.

  • Is it possible to have a many to many calc script equation?

    Hi All,
    I'm thinking there has got to be an easy way to do this - but I've tried a bunch of different ways, and I've only been getting error messages.
    What I want to do is perform an allocation based on head count for a few dozen accounts. The allocation method will be the same for each account, and I wanted to write this in a single line rather than have dozens of lines, one for each account.
    For Example, the following works correctly for me ( Takes Total indirect salaries loaded to "Region Items" and allocates based on headcount loaded to each child of "Operations")
    FIX("Budget", @CHILDREN("Operations"))
    "Indirect Employee Salaries"
    = "Region Items"->"Indirect Employee Salaries" * "Office Staff - Employees" / "Operations"->"Office Staff - Employees";
    ENDFIX
    Because this allocation will be repeated for each account, I would like to have something similar to this:
    FIX("Budget",@CHILDREN("Operations"))
    @CHILDREN("Indirect")
    = "Region Items"->@CHILDREN("Indirect") * "Office Staff - Employees" / "Operations"->"Office Staff - Employees";
    ENDFIX
    However this change to the command gives me "Calc Script Command is Incomplete" warnings.

    You can do this with a "switch" on the fix etc.
    FIX(@CHILDREN("Indirect") ,@CHILDREN("Operations"))
    "Budget"= "Region Items"->@CURRMBR(Accounts) * "Office Staff - Employees" / "Operations"->"Office Staff - Employees";
    ENDFIX
    You will need to check the performance of this, especially if Budget is sparse - although it would remove create block issues.
    You might also need to enclose the "CurrMbr" section in a SUMRANGE to validate, but it is a starter for you.
    Hope this helps
    Andy King
    www.analitica.co.uk

  • CDF - calc script

    The calc script for the Export cdf shows @Jexport being executed like rollup functions - in that there is no requirement that you have 'member = @Jcdf'.When I try this with a sample cdf, I get an error 'not a CALC command'.How do I get Essbase to recognize that this doesn't need anything on the left side?Harold

    An other question about CDF and Script.I want to export data in a SGBDR , the sample works fine but :Is there a way to keep relationnal database connection open ( to increase performance) and so not to load connection class, open connection for each Essbase member ?X. VDS

Maybe you are looking for

  • Maximize/Minimize/Close buttons are all greyed out

    Hello. Ever since a few days ago, the green, yellow, and red maximize/minimize/close buttons at the top left of every window have all been greyed out. They're all still completely usable and they do what you would expect them to do...there's just no

  • Flash Player 10 Install Instructions (x86_64)

    There is a lot of outdated information regarding how to install the Flash plugin in ArchLinux x86_64. The following instructions will install the latest Adobe Flash 10 Firefox Plugin for a x86_64 Firefox version 3.0.3 on a fresh install of x86_64 Arc

  • [Plasma-Next] Docky doesn't display application icons

    Hello, I have a fresh Arch + Plasma 5 install running on my machine. I have followed the arch-wiki to get it up and running. However I have installed Docky and it's shooting errors at me. The main issue is that it doesn't display most of the applicat

  • FMS Server Balancing

    Hello again. I run a FMS 3.5 Server and I want to add additional FMS Servers and load balance the traffic. The plan is to use a script for the developer version of FMS that forwards two incoming FME streams to the different servers, so each FMS Serve

  • HTML with swing

    Hi, Is there a swing component to display html? How can I display an HTML file within a JFrame ? Thanks!