Calculate parent rollup in script

Here is my issue. We have a vendor dimension which contains >50 sub-rollups that are dynamic calc. This creates issues when we run reports as it is performing all the dynamic calc and it takes >20 min to run the report. There are about 1200+ vendors in total. I am trying to see if I can create a calc script and change the parent rollup to store instead of dynamic to speed up the process. What can I do to create a calc script to populate that parent rollup? Does anyone has other ideas? Btw, the dim is a sparse dim.
Thanks.
Mike

Dynamic Calc tagged members with large roll-ups can cause slow retrievals.
That's probably why there's a warning when you tag a member with more than 100 members underneath it.
Tagging these members stored and performing the aggregation/calc during the nightly batch processes is a great idea. You always want to have the quickest batch process times, but when you need faster retrievals you have the option to do the all calculations during off hours.
So by increasing your nightly calcs you can achieve quicker report retrievals the follow day.
I can't remember why, but I never use Dynamic Calc and Store tags.
Brian Chow

Similar Messages

  • Calculate factorial via powershell scripting

    hello guys i written script until calculate the factorial via powershell but i do not know what does not work !
    function factorial( [int] $n ) 
        $result = 1; 
        if ( $n -gt 1 ) 
            $result = $n * ( factorial ( $n - 1 ) ) 
        $result 
    this function can not work with big number like that 999 how can i solve that problem?

    I get similar results, with a slightly different function. I get results up to at least 170. From 180 through at least 990 I get "Infinity" for the answer. At 999 I get your error, which I believe cannot be avoided. Even if you avoided the
    call depth error, PowerShell seems to refuse to deal with such large numbers, and simply outputs "Infinity".
    This article goes into factorials in depth:http://en.wikipedia.org/wiki/Factorial
    It includes a table for very large values, plus a formula for approximating factorials of large numbers. You might be able to code the approximation formula.
    Richard Mueller - MVP Directory Services

  • How do you access parent component from a child in Flex 4?

    Suppose I have a Component A (as a Spark Group) that generates an event, eventX.  Inside Component A, I add Component B (also a Spark Group) that wants to add itself as an event listener for eventX.  How do I access Component A from Component B to register for the event?
    For reference, this relationship should be similar to the MVC pattern where Component B is the view, and Component A is the model and controller.
    If I were implementing this in ActionScript, I'd have no problem coding this.  However, I am using flex, and am still trying to figure out how the FLEX API works.

    GordonSmith wrote:
    B could "reach up" to A using the parentDocument property. Or you could set a reference-to-A onto B.
    Gordon Smith
    Adobe Flex SDK Team
    B could "reach up" to A using the parentDocument property
    Would you mind explaining that?
    set a reference-to-A onto B.
    That is something I am trying to avoid.  I do not want to create tightly coupled code.
    Here is a generic form of the code I am using.  Feel free to tell me what I'm doing wrong in your explanation of how B can "reach up" to A.  Thanks!
    Component A
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" width="837" height="733"
                     creationComplete="componentA_creationCompleteHandler(event)"
                     xmlns:components="components.*">
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   public static const STATE_CHANGED:String = "stateChanged";
                   private var currentModelState:String;
                   protected function componentA_creationCompleteHandler(event:FlexEvent):void
                        changeModelState("second");
                   public function changeModelState(newState:String):void
                        if (newState != currentModelState)
                             currentModelState = newState;
                        dispatchEvent(new Event(IP_Dragon.STATE_CHANGED));
                   public function getModelState():String
                        return currentModelState;
              ]]>
         </fx:Script>
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <components:Component_B id="b" x="0" y="0"/>
    </s:Group>
    Component B
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:components="components.*"
               width="837" height="733" contentBackgroundAlpha="0.0" currentState="first"
               creationComplete="componentB_creationCompleteHandler(event)">
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   protected function componentB_creationCompleteHandler(event:FlexEvent):void
                        currentState = parent.getModelState;
                        parent.addEventListener(Component_A.STATE_CHANGED, modelStateListener);
                   private function modelStateListener (e:Event):void
                        currentState = parent.getModelState();
              ]]>
         </fx:Script>
         <s:states>
              <s:State name="first"/>
              <s:State name="second"/>
              <s:State name="third"/>
         </s:states>
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <components:Component_C includeIn="first" x="220" y="275"/>
         <components:Component_D includeIn="second" x="2" y="0"/>
         <components:Component_E includeIn="third" x="0" y="8"/>
    </s:Group>
    For the record, I know this code does not work.  It has to do with the parent calls in Component B.  Comment out those lines, and the code will compile.

  • Call functions in parent(?) from popup window(?)

    I'm not sure the terms parent or window in flex 4.
    I want to call functions in parent from parent window.
    it seems to be hard.
    Help me please.
    Thanks in advance.
    ========================== index.mxml ==========================
    (root element : <mx:Application> - xmlns:mx="http://www.adobe.com/2006/mxml")
    has Main.mxml in it
    ========================== Main.mxml ==========================
    (root element : <s:NavigatorContent> - xmlns:s="library://ns.adobe.com/flex/spark" )
    public function functInMain():void
    //do something
    protected function dataGrid_itemDoubleClickHandler(event:ListEvent):void
    var arr:ArrayCollection = event.currentTarget.dataProvider;
    var titleWindowInstance:Popup =
      Popup(PopUpManager.createPopUp(this,
       Popup,
       true));    
    titleWindowInstance.rowData =  arr.getItemAt(event.rowIndex);
    PopUpManager.centerPopUp(titleWindowInstance); 
    ========================== Popup.mxml ==========================
    protected function buttonClickedInpopup():void
    Application.application.parentDocument.functInMain(null);//<<- here I want to correct

    Thanks.
    Your callback function works ok
    why calling public functin won't work?
    here are neet examples.
    index.mxml : front page
    SearchEvents.mxml : inside index.mxml
    UpdateEvent.mxml : poped up from SearchEvents.mxml
    ========index.mxml===========
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application pageTitle="CA Management"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:i="test.*"
        width="100%" height="100%" creationComplete="application1_creationCompleteHandler(event)" >
    <mx:Script>
      <![CDATA[
       import mx.events.FlexEvent;
       protected function application1_creationCompleteHandler(event:FlexEvent):void
        myViewstack.selectedIndex = 0;
      ]]>
    </mx:Script>
    <mx:ViewStack width="100%" height="100%" id="myViewstack">
        <s:NavigatorContent id="EventManagement" label="Event Management"><i:SearchEvents x="0" y="0"/></s:NavigatorContent>
    </mx:ViewStack>
    </mx:Application>
    ========SearchEvents.mxml=========
    <?xml version="1.0" encoding="utf-8"?>
    <s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx" 
         x="113" y="163"  
         height="100%" width="750">
    <fx:Script>
      <![CDATA[
       import mx.collections.ArrayCollection;
       import mx.controls.Alert;
       import mx.events.FlexEvent;
       import mx.events.ListEvent;
       import mx.managers.PopUpManager;
       import mx.rpc.events.ResultEvent;
       public function parentFunction(param:String):void{
        Alert.show("parent function called with " + param);
       protected function btnSearch_clickHandler(event:MouseEvent):void
        var titleWindowInstance:UpdateEvent =
         UpdateEvent(PopUpManager.createPopUp(this,
          UpdateEvent,
          true));    
        PopUpManager.centerPopUp(titleWindowInstance);
      ]]>
    </fx:Script>
    <s:Button x="637" y="70" label="Popup" id="btnSearch" click="btnSearch_clickHandler(event)"/>
    </s:NavigatorContent>
    ========UpdateEvent.mxml=====
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:incl="incl.*"
        showCloseButton="false"
        title="Update Event" width="432" height="500"
        xmlns:subscription="services.subscription.*"
        xmlns:core="services.core.*"
        horizontalAlign="left" xmlns:vo="vo.*"
        >
    <fx:Script>
      <![CDATA[
       import mx.core.Application;
       protected function parentFunctionCall(event:MouseEvent):void
        Application.application.parentFunction("param from popup");
      ]]>
    </fx:Script>
    <fx:Script>
      <![CDATA[
       import mx.collections.ArrayCollection;
       import mx.controls.Alert;
       import mx.controls.dataGridClasses.DataGridColumn;
       import mx.core.Application;
       import mx.events.FlexEvent;
       import mx.formatters.*;
       import mx.managers.PopUpManager;
       import popup.*;
       [Bindable] public var rowData:Object ;//to get the parent row
      ]]>
    </fx:Script>
    <s:Button label="parentFunctionCall" id="btnPar" click="parentFunctionCall(event)"/>
    </mx:TitleWindow>

  • How to pass a data from child window to parent window

    Hi,
    I have a jsp page with two hidden fields and a button, On clicking the button a popup will come out. There are two combobox in the popup and a search button. After putting a value in the comboboxes,if I click the search button, I need the datas of the combobox to pass to the parent's hidden fields then I need to do a data base search with that values of hidden fields and display the result in the parent page.
    I could I solve this problem, Please help, Its urgent.
    Thanks and Regards
    Rajib Sharma

    I think that you can use the JavaScipt as follow to pass a data from child window to parent window
    <HEAD>
    <script>
    function passData(){
    opener.form1.test1.value=form2.test2.value; //pass the value of test2 to the parent's test1
    window.close();
    </script>
    </HEAD>
    <BODY>
    <form name=form2>
    <input name=test2 type=text>
    <input type=button onclick="passData()" value=CLOSE>
    </form>
    </BODY>

  • [CS2 JS] Get the parent paragraph of a table

    Hi,
    Anybody here who knows how to get the parent paragraph of a selected table?
    var myTable = app.selection[0];
    var myStory = myTable.parent.paragraphs;
    The script above gives me all the paragraphs of the parent text frame. I want to know the index of the paragraph where my selected table is.
    Appreciate the help you can give. Thanks!

    from VB6 ObjectBrowser (PC):
    Property StoryOffset As InsertionPoint
    read-only
    Member of InDesign.Table
    The location of the Table in the parent story.
    so (VB6):
    myTable.StoryOffset.Paragraphs.Item(1)
    should give you paragraph
    robin
    www.adobescripts.com

  • Piping script line in a powershell script

    Hi,
    I would like piping informations in a powershell script and getting this:
    If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
    $arguments = "& '" + $myinvocation.mycommand.definition + "'"
    Start-Process powershell -Verb runAs -ArgumentList $arguments
    Break
    [string]$scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent # Emplacement du script
    powershell.exe -executionpolicy bypass -File $scriptDirectory\Vcredist2005_Frv1.ps1 install
    =====================================
    ======================================
    My script is looking this:
    $var_InterventionManuelle ="c:\temp"
    $var_FichierLancementManuelle = "install_Man.ps1"
    $var_EmplacementFichierLancementManuelle ="c:\temp\install_Man.ps1"
    New-Item -path $var_InterventionManuelle -Name $var_FichierLancementManuelle -type file
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`nIf (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))"
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`n{"
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`n$arguments = ""&" '" + $myinvocation.mycommand.definition + "'""
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`nStart-Process powershell -Verb runAs -ArgumentList $arguments"
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`nBreak"
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`n}"
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`n[string]$scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent"
    Add-Content -path $var_EmplacementFichierLancementManuelle -Value "`npowershell.exe -executionpolicy bypass -File $scriptDirectory\$var_Scriptactuel install"
    It is failing on the first add-content. Where am I wrong? Is it an easier way to do this?
    Thanks,
    François

    Hi,
    If all you're trying to do is write all of that to a file, you can do something like this:
    $text = @'
    If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
    $arguments = "& '" + $myinvocation.mycommand.definition + "'"
    Start-Process powershell -Verb runAs -ArgumentList $arguments
    Break
    [string]$scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent # Emplacement du script
    powershell.exe -executionpolicy bypass -File $scriptDirectory\Vcredist2005_Frv1.ps1 install
    $text | Out-File .\script.ps1
    Here's some information about here-strings:
    http://technet.microsoft.com/en-us/library/ee692792.aspx
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Logic script average

    hi experts,
    how to use syntax "avg" in logic script? or is there any way to implement the average calculation?
    as example of data in 1 model:
    emp01     entity01     interco01     percent     0.1
    emp02     entity01     interco01     percent     0.2
    emp03     entity01     interco01     percent     0.3
    emp01     entity01     interco01     amount     1
    emp02     enitty01     interco01     amount     1
    emp03     entity01     interco01     amount     1
    calculate average:
    avg = sum(percent) / sum(amount)
    avg = 0.6 / 3
    avg = 0.2
    thank you.

    hi Vadim,
    this average result will be stored and using as basis of other calculation. this average will show in input template with the standard calculation at backend, but user can overwrite it in input template.
    percent means proportion to be allocated
    amount means amount of headcount to related employee (this value always 1 for every employee)
    after i get this average, this value will be used as driver to calculate cost.
    additional example from above:
    emp01     entity01     interco01     cost     1000
    emp02     enitty01     interco01     cost     1000
    emp03     entity01     interco01     cost     1000
    expected average result:
    no_emp     entity01     interco01     avg     0.2
    record another row:
    no_emp     entity01     interco01     avgcost     0.2 * 3000
    i just give a simple example and want to know how to do average in logic script. is it possible to calculate average using logic script?
    thank you.

  • Rollup of Subtraction of Child Entities

    Hello All,
    How can I achieve Roll up of Subtraction of two child entities into Parent Entity.
    for example I have
    A (Parent Entity)
       |--------A&B (Child 1)
       |--------B (Child 2)
    We want to upload summation of A&B trail in Child 1 and only B trail as Child 2 and want to calculate Parent A as Subtraction of both Child 1 & Child 2.
    what are the possible ways to achieve this, please share your views.
    Thanks & Regards.

    Hi,
    Suggest you do a sign flip of data loaded for child B so that when you consolidate A it will give you the required result.
    To still get data of B appearing correctly create reports for B with reverse sign flip in FR.
    Hope this helps.
    Regards,
    Darshana

  • Connecting a script to calendar

    Hi, i've got this datepicker calendar:
      <input class="dmxCalendar2" name="dmxCalendar21" id="dmxCalendar21" />
    <script type="text/javascript">
      // <![CDATA[
    jQuery(document).ready(
       function()
           jQuery("#dmxCalendar21").dmxCalendar2(
             {"altFormat": "yy-mm-dd", "condDates": [], "firstDay": 1, "showOn": "both", "duration": "slow", "showOptions": {"direction": "up", "easing": "swing"}, "yearRange": "c-10:c+10", "onSelect": "MM_goToURL(\'parent\',\'allactstest.html\');"}
      // ]]>
    </script>
    and a script:
    <script>
    var chosenDate = '2012-08-17';
    function checkDate(rgn, doIt) {
        if (doIt('{dsDates::datebooked}') == chosenDate) {
            Spry.Utils.addClassName('id'+doIt('{dsArtists::@id}'),'hidden');
    </script>
    But I can't work out how to make the 'var chosenDate' in the script change to what is chosen in the datepicker.
    Thanks

    I think I found what I'm looking for in ImageReady although I'm not sure how to set it to batch. I don't see the batch command in the File menu like Photoshop...

  • Hi newbe here: I want to divide 2 fields under calculate

    I have named fields D, E, & F  I want to divide D By E and the result will automatically be in the F text box they are all Dollar number except E whicy is a 2 didget pay period.  I have fields A, B, and C add them selves to give me D.  Why does'nt the drop down box have a "/"  ?  I presume I have to write a JScript in the calculate tab, Custom calculation script Edit box.
    Thanks Ron.

    Look what I did, I saved the PDF with something in the simplified field notation. I did not mean to do that.
    What I need is the right formula in the " custom calculation script to divide field E by D to give me F.
    Field E is the pay period usally 26 (but if it were an odd number say "25" the answer would have to be rounded to the nearest penny) I formated it to be a number no decimal point.
    When the number of pay periods is put in field "E" it would have to automatically tab to "F" what if anything should I put in field E?  (onMouseOut)? How and where?
    Thanks:

  • FormCalc syntax and scripting issues

    Hi, I'm a total beginner at LiveCycle and FormCalc. I have been trying to create a simple form for a school assignment in which the user enters numeric data into a table and the last coloum then is calculated via FormCalc scripting. The equation which I have been attempting to express using FormCalc is  simple, (Cell1-Cell2)/Cell3*Cell4. I skimmed through a few tutorials but obviously my understanding of FormCalc and LiveCycle in general is insuffecient. I am hoping someone who could easily do this will help save me from having to learn FormCalc, any help or advice will be very much appreciated.

    You just need to select the field you want the calculation to appear in and go to the calculate event in the script window and use the following in formcalc
    $ = ( Cell1 - Cell2 ) / ( Cell3 * Cell4 )
    or whatever the corresponding field names are.
    Also, you need to cater for empty fields, either set the cells to be numeric with a default value or extend the script to test if a value has been entered yet. Something like
    if ( HasValue( TextField3 ) and HasValue( TextField4 ) ) then
        $ = ( TextField1 - TextField2 ) / ( TextField3 * TextField4 )
    else
         < some other calc here / or nothing>
    endif

  • Accessing parent document div tags from child document loaded inside parent document

    I am loading an ASP document (Child)inside another ASP document (Parent) using Include statements.
    The parent document has certain div tags which have some properties to be accessed from inside the code in child document using javascript.
    Please advise on how to access the parent document varioables and div tags from inside the child document which has been loaded from within the parent document.

    <script src="/SpryAssets/SpryHTMLPanel.js" language="javascript" type="text/javascript"></script>
    <script src="/SpryAssets/SpryTabbedPanels.js" language="javascript" type="text/javascript"></script>
    <link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    <link href="/SpryAssets/SpryHTMLPanel.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
    Spry.Widget.HTMLPanel.evalScripts = true;
    </script>
    </head>
    <body>
    <div class="TabbedPanels" id="TabbedPanels2">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0" >Tab 1</li>
    <li class="TabbedPanelsTab" tabindex="0" onclick="tab2.loadContent('test1/load.asp');return false;">Tab 2</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent" id="tab1">test content 1</div>
    <div class="TabbedPanelsContent" id="tab2">test content 2</div>
    </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels2");
    var tab1 = new Spry.Widget.HTMLPanel("tab1");
    var tab2 = new Spry.Widget.HTMLPanel("tab2");
    </script>

  • Dynamic Calc member has more than 100 children

    In my db, I've a dynamic calc member, in say hierarchy Accounts, that has more than 100 members under it (children).
    I'm using MaxL scripts to update the Accounts hierarchy i.e. adding new members, tagging UDA's etc.
    However, the MaxL command is erroring out with a Network Error: Cannot Recieve/Send data. I understand if I try doing the update via
    EAS and try to save the outline, it gives me the more than 100 children warning but still allows me to save it but via MaxL I cannot force
    it to do so.
    This is just a warning and shouldn't MaxL still save the outline? Is there something else that am missing or is there any solution for this issue.
    This is a Sparse dimension. More members will be added to the hierarchy monthly, thereby not reducing the count below hundred.
    Any help/advise is much appreciated. Thanks.
    @deepak

    I am envisioning an entire sparse Accounts dimension with all of the upper levels dynamic. If it is like most accounts dimensions I have seen it has a lot of level zero members and a lot of parent rollups. looking at top level members could be very slow (relative to if they were calculated or dense). We have all done interesting things in our cubes to gain some performance measure trading off calculation and retrieval performance. Doing something like this is an area where a testing is crital

  • Members Not Rolling Up Correctly

    Good morningWhen working with Excel at the bottom level the members have the correct values. I calculate them in a script. The problem arises when you look at the values at the parent level, the values are no longer in their seperate members but rolled up into one member. eg. At Level 0Tyre 1.1: 2Tyre 1.2: 4Tyre 2.1: 2Tyre 2.2: 2At Level 1Tyre 1: 10Tyre 2: 0Hope that makes sense. Simon

    It's difficult t tel from your description, but maybe you need to use two-pass calc. Are you using dynamic calc? Member formulas?

Maybe you are looking for

  • HP Connected Remote App

    HP Connected Remote App on iPhone 5- Just downloaded yesterday. The only issue is it prints a pdf just fine but not Word or Excel.  Format is lost. Any suggestions?

  • My tool bar disappeared and I can't get it back!

    I followed the instructions to go to customize and click on tool bar at the bottom of the page, but there IS NO toolbar at the bottom of the page. What now?

  • Creating a Staff without a midi part??

    Hi, I'm trying to score something in Logic. If look at scoring in the manual, it tells me "a staff must exist" before you can score (well obviously!). Is it possible for me to create a score before a midi part exists. So can I create a new project, g

  • Columns

    I am using one of the templates, Darkroom, Podcast. I would like to have a two column text table. Is that possible? I manually did one but only the template text box show up in podcast notes.

  • Message Data Tab Editing (Hide or Add Columns)

    In SAP B1 when a Marketing Document is sent as an email from SAP in the Message > Data-Tab by default a fixed number of columns (Date, Customer, Remarks,and, Due Date) are visible and sent in the email. We would like to have the ability to Add and Re