Problem of calculation Script

Hi all



I have the following calculation script:

UPDATECALC OFF SET;
SET AGGMISSG

Fix (& CurVersion,
& BudYr,
localcur,
@Relative (@MEMBER (@CONCATENATE (@SUBSTRING (@Name ([Department]), 0, 3), "_A01")), 0),
@Relative("All_Products",0))


Fix ("dirty", @relative(Expenses,0), Jan: DEC)


Budget)

If (@isuda ('entity', 'New'))

Budget = real-> final-> & PriorYr;

endif
)

endfix
endfix


I want to copy the real-> Final data budget-> work only for the entities marked with UDA 'new '.

I can't use datacopy command I use if statement.

There are 2 problems with these scripts:

1. it does not create the blocks for the new budget year since we don't use datacopy

2. If I try to use create custom block missign it opens too many blocks in the Essbase database.

How can I change the code above to achieve this datacopy resolve these two issues I have mentioned.

Thanks for your help.

Two thoughts:
(1) create new UDAs, for example, NewA1, NewA2, etc. A pain, but it could be done.
(2) I think that this has been suggested before, but I don't know if it would really work: DIFFICULTY (@RELATIVE ("Division_A1", 0) AND @UDA ('entity', 'New'))

Kind regards

Cameron Lackpour

Tags: Business Intelligence

Similar Questions

  • Calculation script of the OSB for exchange rates - shared members

    Hello together,

    Happy new year!!!

    I need your help with a BSO calculation script in the exchange rate.

    Here you can see how the entity & currency hierarchies are made up:

    Hierarchy of the entity

    Hierarchie1 (element Stored, EUR) - all children are only once in the hierarchy.

    H1Parent1 (stored element, EUR)

    H1P1Child1 (stored element, EUR)

    H1P1Child2 (stored element, EUR)

    H1Parent2 (stored element, SEK)

    H1P2Child1 (stored element, SEK)

    H1P2Child2 (stored element, SEK)

    Hierarchie2 (Stored item, EUR) - the child might be several times in this hierarchy!

    H2Parent1 (stored element, USD)

    H1Parent1 (element Shared, EUR)

    H1Parent2 (element Shared, SEK)

    H2Parent2 (stored element, CAD)

    H1Parent2 (element Shared, SEK)

    H1P1Child1 (element Shared, EUR)

    Hierarchy of currencies

    Local currency

    EUR

    USD

    SEK

    CAD

    Reported (group currency)

    Euro

    Parent currency

    EUR_USD

    EUR_CAD

    EUR_SEK

    First script:

    For the exchange rate of the national currency in euro (1 hierarchy), it was very easy because I could give each level-0-member of an attribute (UDA) for the currency. So it's pretty easy to create a script for all the members-0-level ((DEV) duration: 12 minutes)

    'Euro')

    IF (@ISUDA ("Accounts", "AR"))

    IF (@ISUDA ("Entities", "heart")) 'Euro ' is' EUR '.

    "Else if (@ISUDA ("entities","cAED")) 'Euro' = (@SUMRange ("AED","January": & CurrMonth)) /"AED"-> Average_Rate;

    ENDIF

    ENDIF);

    Second script - Part1:

    But for the second hierarchy (hierarchy 2) I have the problem that there are a lot of shared items and I can't give them an obvious UDA in which I can calculate the currency ((DEV) duration: 12 minutes).

    ("Parent currency"

    IF (@ISUDA ("Accounts", "AR"))

    IF (@ISMBR (@RDescendants("H2Parent1",0))) 'Euro_USD' = (@SUMRange ("Euro", "January": "January")) * "USD"-> "Average_Rate";

    ElseIf (@ISMBR (@RDescendants("H2Parent2",0))) 'Euro_CAD' = (@SUMRange ("Euro", "January": "January")) * "CAD"-> "Average_Rate";

    ENDIF

    ENDIF);

    Second script - Part2:

    This formula works, but it is very slow, because I have several fixes. (Duration (DEV): round about 1 h)

    FIX (@RDescendants("H2Parent1",0))

    ("Parent currency"

    IF (@ISUDA ("Accounts", "AR")) "Euro_USD" = (@SUMRange("Euro","January":"January")) * «USD»-> «Average_Rate»;)

    ElseIf (("Accounts", "CR") @ISUDA) "Euro_USD" = (@SUMRange("euro","January":"January")) * «USD»-> «Closing_Rate»;)

    ENDIF);

    ENDFIX


    You have an idea how I can improve my second calculation script in a dynamic and efficient?


    I hope that I have described my problem very well.


    Thanks a lot for your help


    Ben

    change "Motto of Parent" to "Euro_USD" would not make a difference if the hierarchy of currencies is Sparse

    I'll try to make the dense hierarchy of currencies as long as it does not have the size of your too big block. If make you it dense AND change "motto of Parent' to 'Euro_USD', it must increase the speed a lot.  However to change the size of Sparse to Dense is a very big change for the database.

  • Is it possible to convert excel function if (and a custom calculation script

    Our field staff use many Excel files for project documentation.  Our organization moves for iPad instead of laptops and we found that a PDF file to be filled on-line is a great resource for our staff.  I have created several of these forms that contain multiple lines and I just starting to learn how to write custom calculation scripts.  I have a more complex than most calculation and I don't know if this can be written in script.

    = IF (I6 < 0.7, G6 * 0.8, IF (AND (I6 > = 0.7, I6 < 0.8), G6 * 0.85, IF (AND (I6 > = 0.8, I6 < 0,9), G6 * 0.9, IF (AND (I6 > = 0.9, I6 < = 1,1), G6 * 1, IF (AND (I6 > 1.1, I6 < = 1,2), G6 * 1.1, IF (AND (I6 > 1.2, I6 < = 1.3), G6 * 1.15, of"extra work"))))))

    I6 is OverdepthRow1

    G6 is WithDowelsRow1

    I think I understand how to get started

    var v1 = get.thisField("OverdepthRow1").value;

    var v2 = get.thisField("WithDowelsRow1").value;

    if(v1<0.7) {}

    var result = v2 * 0.8

    Event.Value = result}

    ElseIf (v1 > = 0, 7 - now I don't know what to do!)

    I hope that I used the correct brackets and braces in the right places.

    I appreciate your help and your advice.

    Thank you

    Rhonda

    I'm sorry, I made a mistake with the first two lines. I have corrected a problem but introduced another. They must be:

    var v1 = + getField("OverdepthRow1").value;

    var v2 = + getField("WithDowelsRow1").value;

  • How to make the calculation script to show 2 decimal places and stop rounding down to integers?

    Hello. First of all, thank you to those of you who have helped me create an interactive PDF file last year that worked perfectly if only integers are entered. This year, my client wants to show two decimal places in the calculations, and I'm back in this forum hoping to find the same expertise to make it happen.

    My form includes 43 fields for various monthly expenses. The sign of dollar for each field is part of the content of the form, not part of the scope of formatting. Users enter values directly in these fields, and the fields are formatted to display two decimal places. Each of these includes a the following validation script:

    Event.RC =! (event.value & & + event.value < 0);


    To the right of each of these fees, the fields are yes/no boxes ( expense Typecalled) that answer the question, "is this essential expense? The value of exports for Yes's 'essential', and the value of exports is "discretionary".


    A value entered in all areas of expenditure is directed to the field Total expenses by checking Yes or field Total discretionary spending by clicking No. two of these total fields are formatted to display two decimal places. In addition to long calculation scripts, the two totals fields include this custom validation script:

    If (event.value == "0") {event.value = util.printx ("", event.value)}

    Here's the problem: when values with two decimal places are entered in any area of expenditure, the calculation in two fields of total script rounded to the whole number closest. When 10.99 is entered in a field of expenditure and the Yes checkbox is checked, the value 10.00 is displayed in the field Total expenses . I want to display 10.99.

    For testing purposes, I inserted a new text field and did a simple calculation in choosing the fields of the somme and the values displayed correctly. The problem is definitely with the script in the two fields in total .


    I can drop the scripts of math here, but they are long and I'm not sure what the Protocol is super-long positions. I could also download the file, but I never did it and will need to understand this.

    Thank you for taking the time to read this. If you can help me, very well!

    To explicitly convert the field values for numbers, do something like this instead:

    var expense0 = + getField('monthly$.0').value,

    depenses1 = + getField('monthly$.1').value,

    etc.

  • Custom calculation script

    Hello

    I have some problems eiditing my custom calculation scripts.

    at present, there are: ColorField ('IncubatorLow', ValidateMinMax ('IncubatorLow', 400, 1000) & & ValidateOrder ('IncubatorLow', 'IncubatorHigh'));

    I want to change it

    If (event.value > = 400 & & event.value < = 1000) event.target.textColor = color.black;

    Else if (event.value > 1001) event.target.textColor = ["RGB", 0.5, 1, 0];

    Else if (event.value < 399) event.target.textColor = ["RGB", 0.5, 1, 0];

    But whenever I save my pdf file, it keeps the old one? Although even I tried to delete, lock and so on?

    Under java script, I can't know what is may be the course?

    Any ideas? Thanks in advance!

    Found under Java Script: ColorField runs by Custom Caluclations a string. But if I do one for example a new java script for CustomColors - and change of ColorFields to CustomColors.
    And then save the pdf file, it always uses the Colorfield?

    Just solved the problem.

    The form field name: IncubatorLow - IncubatorHigh - now, I just called them: IncubatorLowColor - IncubatorHighColor, then change the java script for validationminmax and change the colors for my 'java script' CustomColors.
    Can register with it back to the original script.

    I do not understand why change the field can solve it, but it has

  • Calculation scripts do not work!

    I have two calculation scripts that worked, but now are not after a few updates from adobe. He's not making any sense to me and I was not able to understand. Can you see where my problem could be?

    The scripts are:

    custom calculation script lenderstitle;

    lenderstitle = (loanamount *. 0026) 10th round until neareast; calculate the value;

    var lenderstitle = this.getField("loanamount").value * 0,0026; round the value;

    Event.Value = MyRound (lenderstitle, 1);

    and

    ownerstitle = (((loanamount *.0046)-lenderstitle)) round up to nearest 10

    calculate the value

    var ownerstitle = this.getField("loanamount").value * 0,00465 - this.getField ("lenderstitle") .value;

    round the value;

    Event.Value = MyRound (ownerstitle, 1);

    Any help to solve this mystery would be greatly appreciated!

    I have redone all & found the correct script to be

    function MyRound (nValue, nDec) {}

    var nRound = util.printf ("" %, 1-1. "') + nDec + "f", nValue)

    Return Number (nRound);

    } / / end MyRound funciton.

    custom calculation script lenderstitle;

    lenderstitle = (loanamount *. 0026) 10th round until neareast;

    calculate the value;

    var lenderstitle = this.getField("loanamount").value * 0,0026;

    round the value;

    Event.Value = MyRound (lenderstitle, 1);

    Thanks for your help.

  • Character limit to the custom calculation Script?

    Hello. I have a document that has a text form field. I want to run a custom calculation script which basically says if field 'Number group' = xxxxxxx, so the 'Group name' field should = ABC company.

    I have a list of almost 575 group numbers and names that I need to put in the script. And I have the script works fine, but I'm guessing that there is a limit of characters for the field script? It doesn't let me put my complete list in there.

    Any suggestions on how to work around this problem?

    Thank you

    Brandy

    Yes, there is a character limit for internal JS Editor. The round it is to use an external, such as Notepad.

    Do go to Edit - Preferences - JavaScript and select "Use the external JavaScript editor" and then select the application you want to use.

    Don't forget, however, that you must close the external file each time that change you it if you want to update in the PDF file.

  • calculation script based on the value of a radio button

    I wonder if anyone can give me help. I'm doing a calculation script that I can insert in a number field that will calculate only when a radio button is checked. I'm doing an estimate sheet when some check boxes or radio buttons are selected (such as the moving of furniture, pulling up old flooring), it will calculate a supplement based on this selection. Any help would be appreciated.

    Hello

    Paul is right, it's probably something small that is causing the script to fall. Make sure that the things you talk about in your script are correct (to the right name and the full reference in the event of different subforms).

    There is also a syntax button to tick at the top of the script editor. If you click this button, he can identify the problem.

    In which case it might be useful, here is a sample: https://acrobat.com/#d=bUfCkHbTaU0 * GD6Y7pv41w

    Good luck

    Niall

  • Performance of calculation scripts that have no ends to 9.3

    Hi all

    I have a problem with a calculation script, this script is perfect in essbase 9.2 (this takes some seconds 700 for execution) but to 9.3 that is not end that I wait hours (16 hours and always on) Please, help to find there is something wrong with the version of essbase 9.3.1
    the script is:

    DIFFICULTY ("Julie", "NForecast",
    +@LEVMBRS ("sales", 0), @LEVMBRS("Key Account Type", 0), +.
    + @LEVMBRS("Entity",0), @LEVMBRS("Market",0), @RELATIVE("Product",0)) +.

    FIX (currmonth, mp1, mp2, and mp3 and mp4, & mp5, & mp6, & mp7, & mp8, & mp9, & mp10, & mp11 & mp12,
    + 'Quantity', 'Recipes', 'Other income', 'Journal') +.

    + "FY05 +.

    +(If ("Forecast"<>#missing) +)
    IF ('forecast' - 'SDDAS'-> 'Serge' - 'ADDT'-> 'Serge' > 0)
    + "Forecast" - "SDDAS"-> "Serge" - "ADDT'-> 'Serge '; +
    ON THE OTHER
    + 0 ; +
    ENDIF
    ON THE OTHER
    + #missing; +
    ENDIF;
    +)+

    ENDFIX
    ENDFIX


    Thank you in advance.

    Thanks for sending on to script things... couple contour and calc:

    1. probably can't hurt to change your dense sparse settings as you block size is too small... only 4592 B, try to make your Scenario Dense dimension, it will increase the size of your block to a comfortable 64, 288 b

    2. part of your formula looks like this:

    ________________________________________________________________________________________________________
    / * computation of ATP to the month level * /.
    DIFFICULTY ("V00",
    "ATP"
    @LEVMBRS ("sales", 0);
    @LEVMBRS ("key Account Type", 0);
    @LEVMBRS("Entity",0),
    @LEVMBRS ('market', 0),
    @RELATIVE("ELECTRICITY",0),
    @RELATIVE("GAS",0),
    @RELATIVE ("LIQUID MEASUREMENT", 0 ").
    @RELATIVE("OTHERS",0),
    "Prod_Tech")

    DIFFICULTY ("jan09", "Feb09", "mar09", "Avr09", "May09", "jun09", "jul09", "Aou09", "sep09", "oct09", "nov09", "Déc09", "jan10",
    'Quantity', 'Recipes', 'Other income', 'Journal')

    "FY05")
    IF ('Accepted forecasts'<>#missing)
    IF ('Forecasts accepted' - ' Due Date already shipped for sale "*->"V00"-*"sales Due date back to the ship"-> *"V00"* > 0" ")
    "Forecasts accepted' - ' Due Date already shipped for sale" *-> "V00" *-"Sales Due date back to the ship" *-> "V00" *; "."
    ON THE OTHER
    0;
    ENDIF
    ON THE OTHER
    #missing;
    ENDIF;
    )

    ENDFIX
    ENDFIX
    ________________________________________________________________________________________________________

    Since you already fixed to V00, there is no need to add it as an operator of dimension crossed in your statement SO, try this:

    ________________________________________________________________________________________________________
    / * computation of ATP to the month level * /.
    DIFFICULTY ("V00",
    "ATP"
    @LEVMBRS ("sales", 0);
    @LEVMBRS ("key Account Type", 0);
    @LEVMBRS("Entity",0),
    @LEVMBRS ('market', 0),
    @RELATIVE("ELECTRICITY",0),
    @RELATIVE("GAS",0),
    @RELATIVE ("LIQUID MEASUREMENT", 0 ").
    @RELATIVE("OTHERS",0),
    "Prod_Tech")

    DIFFICULTY ("jan09", "Feb09", "mar09", "Avr09", "May09", "jun09", "jul09", "Aou09", "sep09", "oct09", "nov09", "Déc09", "jan10",
    'Quantity', 'Recipes', 'Other income', 'Journal')

    "FY05")
    IF ('accepted forecasts' #missing)
    IF ('Forecasts accepted' - 'sale Due Date already shipped'-"Sales Due date back to the ship" > 0)
    "Accepted forecasts' - 'sale Due Date already shipped'-'sales Due date back to the ship";
    ON THE OTHER
    0;
    ENDIF
    ON THE OTHER
    #missing;
    ENDIF;
    )

    ENDFIX
    ENDFIX
    ________________________________________________________________________________________________________

    Good luck.

    Thank you
    [EssbaseInfo.com | http://EssbaseInfo.com/]

  • lately and I don't know why I see a pop up of a problem with the script. can some1 help me?

    There is a pop up of a problem with the script. He asked end and contuniue the script. I didn't have this problem before. Please help me this is getting really annoying. He asks a lot

    I changed a theme and almost never have a problem again...

  • Having a problem with the script error message

    The error message and web page script error every move I make now. I tried to check and uncheck boxes tab in advance internet options. I also ran a check of the system that did not help either. Any suggestions? Thank you

    Hi Mic,

    From the description, it seems that you have a problem with the script error message in Internet Explorer.

    To better understand the question, please answer the following questions:

    1. is specific to a particular Web site question?

    2 have you made changes on the computer before this problem?

    3. What is the exact full error message and web page of script error message?

    4. When you get exactly the script error message and web page error message appears?

    5. what exactly you're talking about when you say "system check"?

    See the article mentioned:

    How to troubleshoot script errors in Internet Explorer

    http://support.Microsoft.com/kb/308260

    Hope the above information is helpful. If you have any question back to us, we are happy to help you.

  • Clarification of calculation script

    Hello

    Can someone tell me the differences between the underside of the calculation scripts.

    Text 1:

    SET CreateBlockonEQ

    Fix (dim1, dim2)

    Budget

    (

    Profit = (sales - COGS) * 2;

    )

    CreateBlockonEQ Off SET;

    ENDFIX:

    Text 2:

    SET CreateBlockonEQ

    Difficulty (Dim1, Dim2,Budget)

    Profit = (sales - COGS) * 2;

    CreateBlockonEQ Off SET;

    ENDFIX;

    the output of both calculations should be the same, the only difference (and I'm sure someone will correct me) lies in how Essbase process calculation

    correction on the budget, the calculation runs only for the Budget scenario, where as with the fix but does not include a scenario, it will run the calculations for all scenarios, calculate the only member of Budget, but to evaluate all possible options.

  • How to use the @accum function in the calculation script

    Dear all.

    I'm new in essbase - calculation script so don't know how to use the @accum function.

    I want the aggregation value of child to parent

    Hierarchy

    Product

    100 > Storage Dimensions marked as stored (marked as intentionally as I want to calculate the value using the calculation script)

    100. 10 (+)

    100-20 (+)

    100-30 (+)

    I'm trying calculation Script

    100 = @Accum (@children("100"), jan: Feb);

    It works when I use below

    100 = @Accum("100-10",Jan:Feb);

    Error:-number of Dimensions [1] does not match number of gen/lev [3] office [@Dim]

    Don't know how I can roll up to an aggregate value of all the members of the child to the parent.

    Error.PNGhierachy.PNG

    you do this more difficult it must be. If you want to accumulate up to 100 then you could just make your calc

    '100 '.

    but that would be only 100, to make the OU any dimension would

    AGG (Product);

    Or better yet

    AGG (Product, Market);

  • Calculation script, loading data in each block?

    Hello

    I have a calculation script that does not replace an existing value with 1000. It should not do anything if the value is 0 or #missing, but I found it load actually numbers on all the blocks without worrying. Am I wrong in something?

    :

    FIX (@RELATIVE(Dimension1,0), @RELATIVE(Dimension2,0))
    FIX (& CURRENT_SCENARIO, & CURRENT_YEAR)
    "ACC100")
    IF (ACC100! = 0 OR ACC100! = #Missing)
    ACC100 = 1000;
    ENDIF
    ENDFIX
    ENDFIX


    Any help will be appreciated.


    Kind regards

    you want to use AND it is not OR

    in your case it will always return the true value, it will not not 0 or may not be #MISSING.

    If you use, and it won't work if its not the 0 and not #missing

  • Customized for Acrobat field calculation script

    Hi, I have a field calculation script. I want to calculate exp (x), I want to link a X 'A' value. May I know what is the formula for this calculation?

    From another angle, I found at online, the operation is < 2.71 * X >, means 2.71 X power. But duno why <>* may not work to this end (power) to the custom calculation script.

    Do I know what other script can be created for exp (x).

    Please notify. Thank you.

    Of

    McCarthy

    Thank you all! I finally have the answer by myself already.

    Use this formula:

    Event.Value = Math.exp (this.getField("A").value)

    Yes!

Maybe you are looking for