Macro - multiply numbers at two different levels

Hi Folks,
I am trying to write a macro which takes KF at a detailed level and multiplies it with another key figure at a different level of aggregation. Any ideas in this direction will help.
A - B
KF 1 = 10 %
A - C
Kf 1 = 20%
A
KF 2 = 100
I want to write  a macro that gives following result
A - B
KF3 = 10 ( 10% * 100)
A - C
KF3 = 20 ( 20% * 100)
Regards,
Sachin
Edited by: Sachin Ganesh Shetty on Feb 12, 2009 4:57 AM

Hi,
I had a similar requirement of running a macro at 5 level and use a data at 3 level as one of the inputs.
what i did was i wrote a Z function module which called /sapapo/msdp_data_read and retrieved the value at 3 level.
Thus i was able to extract a 3 level value and use it to run a macro at 5 level.
Please let me know if this helps.

Similar Messages

  • Multiplying data at two different levels

    I have Actual Forecast Bias data generated at a particular level (%Bias). I want to multiply this against other data that is at a different level in the same cube so as to adjust the forecast in line with actual performance. The Bias% data is at Battery Part# level. The data that I want to multiply it against is Appliance/Battery level. When I run it, the multiplication operates against a rolled up consumption level for all appliances that use a particular battery. I need the Bias % to operate at the battery level, not the rolled up level..
    I'm a newbi at this so any help welcome
    See the code below
    FIX (Batteries, @IDESCENDANTS ("A Size Family"),appliances,ww,@idescendants(NA));
    "New forecast %" = #Missing;
    "Bias %" = #Missing;
    "Bias %" = ("trade units" -> Actual/"trade units");
    ENDFIX;
    FIX("wif 1")
    FIX (@LEVMBRS(appliances,1),@levmbrs(Batteries,0), @IDESCENDANTS ("A Size Family"),ww,@idescendants(NA));
    "New forecast %" = consumption*"Bias %";
    ENDFIX;
    ENDFIX;
    FIX("wif 1")
    CALC DIM (WW, Supplies, Printers);
    ENDFIX;

    Hi Johnnie
    I assume the important bit is the bit within the second fix:
    "New Forecast" = Consumption * "Bias %";
    The way you have your fix statement set up it is looking at level 0 members in your Appliances and Batteries dimensions (I'm reading your post as if they are separate dimensions). I assume your issue is that the one piece of data is at level 0 interesections of appliances and batteries but the other piece is not possibly at level 0 of one dimension and level 1 or higher of the other, Bias% being the one at the higher level?
    If that is the case then I think you need to look at a way of getting from the level 0 member to the correct intersection point(s).
    Have you had a look through the technical reference at functions like @PARENTVAL, @ANCESTVAL or the multidimensional options for the same @MDPARENTVAL and @MDANCESTVAL, it sounds like your formula needs to be something along the following lines
    "New Forecast" = Consumption * @PARENTVAL(Appliances, "Bias%");
    What the above would do differently to your original code would be to get the Bias % value from the parent of the current level 0 member of the appliance dimension being calculated. While this might not be exactly what your requirement is hopefully it will steer you in the right direction.
    Hope this helps
    Stuart

  • Sorry last question got knocked back my ipad and iPhone on two different levels and I am not able to play through Facebook so not able to progress or unlock next level through Apple store. Don't know how to resolve problem

    Sorry last question got knocked back my ipad and iPhone on two different levels and I am not able to play through Facebook so not able to progress or unlock next level through Apple store. Don't know how to resolve problem

    Thank you again for all of your help!! I really appreciate it!
    I think I am following -- I was able to upload to my iPhoto and all photos and videos are there that is a plus! I tried to create an Event in my iPhoto and put all of my photos in that event but for some reason, now my iTunes it not recognizing that Event in my iPhoto. It is not allowing me to import just that event at the moment but I may be doing something wrong. At least all of my pics and vids are in iPhoto so that is a plus and I know they are at least saved somewhere. Just for some reason, my iTunes it not locating the event that I created with only those photos.
    Thank you for letting me know about my contacts! How do I know if I have the contacts app?
    Also, I had no clue that my iCloud could be backed up via cellular data! However, is this a new feature with the most updated iOS?? Unforutnatly I am like 2 iOS updates behind because I don't have enough storage on my phone. I still get the notification that my phone needs to be plugged in and connected to wifi in order to back up to the cloud :-(
    How can I sync using USB? Right now when i click on the info tab for my iPhone in my iTunes this is the answer that I get -- I am a little unclear as to what it means.
    Sync Contacts:
    Your contacts are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone
    Sync Calendars:
    Your calendars are being synced with you iPhone over the air from iCloud. Over-the-air sync settings can be changed on you iPhone

  • I am wanting to exactly match two ID numbers from two differing worksheets within one work book. Once matched I am wanting to retrieve a row value from the second worksheet into the first. Any help much appreciated.

    I am wanting to exactly match two ID numbers from two worksheets within the one work book. ID numbers are non linear. Once exactly matched I wish to retrieve a corresponding row value from worksheet two and have it appear in worksheet one against the correct ID number. I have been looking at IF, VLOOKUP, and MATCH functions and suspect that what I want to do requires a combination of two or more. Any help will be greatly appreciated.
    regards Vaughanh

    Vaughan,
    Data A:D is all cells start at column A thru column D.
    There is built-in help using the menu item "View > Show Function Browser"  in the search field (top right) you can enter vlookup and you will see the detailed description.
    From this we see:
    VLOOKUP
    (search-for, columns-range, return-column, close-match)
    search-for:  The value to find. search-value can contain any value type.
    columns-range:  A range of cells. range is a reference to a single range of cells, which may contain values of any type.
    return-column:  A number that specifies the relative column number of the cell from which to return the value. return-column is a number value. The leftmost column in the range is column 1.
    close-match:  An optional value that determines whether an exact match is required.
    close match (TRUE, 1, or omitted):  If there’s no exact match, select the column with the largest top-row value that is less than the search value. Wildcards can’t be used in search-for.
    exact match (FALSE or 0):  If there’s no exact match, return an error. Wildcards can be used in search-for.
    So... the 2,0 means return the value form the same row as the lookup value but from the 2nd column of the range.  3, 0 means from the 3rd column.  the ", 0" means exact match

  • Multiplying elements of two different arrays

    hey, I have a while loop thats performing two separate operations similtaneously and filling the data elements of two different 1d arrays with data.with each iteration of the loop a new value pass from an operation to an array.
    I need to multipy to corresponding elements of the arrays such the first element of one array is skipped. so element i0 * element j1 , element i1 * elemnent j2 etc. how can i acess the elements and make the calculations? arrays could have hundreds of elements.
    Thanks.
    Brendan

    blue silver wrote:
    hi Peter,
    I have an array of 2,000,000 values (each long int). I need to do an "Moving average" operation which would than:
    1) takes average of the first 10 values , plots it
    2) remove the first value ,add 11.th value, take average, plots it in the next 100 ms in the chart
    3) remove the first value, add 12.th value, take average, plots it in the next 100 ms in the chart
    (as you see , it is a kind of shifting) the averaged array elements is always 10 , and after averaging those 10 elements , plot it with 100 ms distance in the graph.
    1999989)  remove the 1,999,989 th element , add the last element
    you have a possible idea ?
    your help will be tremendously appreciated.
    Regards
    Silver
    Try this.  It iterates 10 times taking a subset of the array each time to sum it to a shift register.  When done, divides by the total number of iterations.  So it adds i0 to i1 to i2 to i3 to i{N}.  For each element from i0 up.  It will give you an array where n elements are missing  (because elements 0 through n-1 don't have N samples to average to.
    Message Edited by Ravens Fan on 11-26-2007 09:26 PM
    Attachments:
    Example_BD.png ‏4 KB

  • Swap phone numbers between two different accounts.

    I currently have two phone plans and two phones. One is on my mother's account and the other is a new phone I just started on my Fiance's account. They are completely separate from each other. My mother has a plan she own's and my fiance has a plan she owns.
    My question is; is it possible to swap numbers between the 2 phones? I want the number from my old phone that is on my mother's plan to be on my new phone that I just got. My mother plans on letting the other phone run out of contract and cancelling the line. I know I can swap the sim cards, but that would put my new phone on the wrong plan.

    Why didn't you perform an Assumption of Liability (AOL) to transfer your original line from your mother's account to your fiancé's account?

  • Cant unload movies on two different levels?

    Hi guys,
    I am having trouble with unload an loading movies. Basically I am loading a movie into a container, which works a charm:
    graphicsbut.onRelease = function() {
    _root.createEmptyMovieClip("container",1);
    loadMovie("Graphics/Graphics.swf","container");
    container._x = -22 ;
    container._y = 0 ;
    And then I want to load another movie above this one, also working:
    Dyson_hit.onRelease = function()
    Dyson_mc.gotoAndPlay("out");
    loadMovieNum("Graphics/Catwalks.swf", 2);
    disableBtns();
    But NOW the problem....I want to unload them both when a close button is pressed on the third loaded swf?
    Also, ideally I would like to add that second movie clip into a container, so I can position it correctly, but when I try copying the code I use on the first, it doesn't seem to work...is it to do with the "root" bit perhaps?

    to load both into a container movieclip:
    graphicsbut.onRelease = function() {
    _root.createEmptyMovieClip("container",1);
    loadMovie("Graphics/Graphics.swf","container");
    container._x = -22 ;
    container._y = 0 ;
    And then I want to load another movie above this one, also working:
    Dyson_hit.onRelease = function()
    Dyson_mc.gotoAndPlay("out");
    _root.createEmptyMovieClip("container2",2);  // use higher depth and different name
    loadMovie("Graphics/Catwalks.swf", _root.container2);
    disableBtns();
    and you can control movieclips loaded into _levels:  you must wait until loading is complete (ie, use preloader code or an mcl).

  • Peoplesoft Panels for one record on two different level

    There are two key fields on the record. I want to display only one key field as header and rest on the grid. Two key fields are
    New item (K) search key, list box
    Old item (K) search key, list box
    other fields...
    1. I have created a panel that is used for one new item that replaces bunch of old items(Item Supersedure) in which I used new item key in the header and old key item field in the grid. This works fine.
    2. But, I also want another panel that needs old item field in the header and bunch of new items in the grid for the same record(one old item being replaced by few new items).
    I made both old and new item field search key and list box, so that I can use them to create panel for these two situation.However, this second panel is not working right. Everytime I insert new items in the grid, it doesn't copy old item on the header that is associated with it on database after save.
    Since, this was not working, I was thinking of creating a view, work record etc but that doesn't seem to work either.
    Please share your expertise. Your help will be highly appreciated.
    Thanks

    There are two key fields on the record. I want to display only one key field as header and rest on the grid. Two key fields are
    New item (K) search key, list box
    Old item (K) search key, list box
    other fields...
    1. I have created a panel that is used for one new item that replaces bunch of old items(Item Supersedure) in which I used new item key in the header and old key item field in the grid. This works fine.
    2. But, I also want another panel that needs old item field in the header and bunch of new items in the grid for the same record(one old item being replaced by few new items).
    I made both old and new item field search key and list box, so that I can use them to create panel for these two situation.However, this second panel is not working right. Everytime I insert new items in the grid, it doesn't copy old item on the header that is associated with it on database after save.
    Since, this was not working, I was thinking of creating a view, work record etc but that doesn't seem to work either.
    Please share your expertise. Your help will be highly appreciated.
    Thanks

  • Multiprovider - two infoproviders with different levels of summarization

    Hi Gurus,
                  I need to create a report which requires data from two infoproviders, I am thinking of building a multi provider on top of the two infoprovider . I wanted to know if its possible to create a multiprovider on top of two infoprovider with different level of summary. Any suggestions with be very helpful for me.
    Kindly let me know..thanks in advance...
    cheers,
    Tuck

    Hi
    Two different level of summarization will throw inconsistency in reporting
    It is not advisable
    Regards
    N Ganesh

  • Two different retrieval results on two spreadsheets for same account

    I am encountering some very bizarre retrieval behavior that I've never seen before. The version is 11.1.1.3. I have a dynamically calculated account, which produces a Contract-to-date value for Net Sales.
    The formula is:
    IF(@ISMBR("Jan"))
    @MDSHIFT("CTD Sales", 24, "Period", , -1, "Years", ) + "Net Sales";
    ELSE
    @PRIOR("CTD Sales") + "Net Sales";
    It's always worked correctly as far as I can determine. I took a copy of the outline and put it in my dev system and have been working on some other development. In testing, I noticed that my CTD Sales wasn't retrieving the correct number. This is on a spreadsheet with multiple other accounts on it. It works fine up through FY12, then in January of FY13 and thereafter, produces incorrect numbers, with no apparent pattern of error. So I put just the Net Sales and CTD Sales members onto another spreadsheet, without all of the other stuff, and retrieved that, and it produced the correct numbers. It's not a matter of having a spreadsheet formula in the retrieval spot that I've forgotten about (I've done that before). I also copied the spreadsheet with the wrong numbers, and retrieved in Smart View (was retrieving in Essbase add-in before), and got the same wrong numbers.
    In addition, I actually have three dynamically calculated CTD accounts on the sheet, and the bizarre behavior is happening for all three. With all of the other accounts on the sheet, wrong numbers. With only those accounts on the sheet, correct numbers.
    Also, for more information, one of my calculation scripts uses these CTD members, and it is producing the correct result, so this appears to be isolated purely to spreadsheet retrieval.
    So how can the same exact dimension intersection produce two different numbers on two different spreadsheets? Why would having other account members on a spreadsheet affect the results of one of the accounts? Has anyone ever encountered this before?
    Sabrina

    are you sure you have same combinations from rest of dimensions in both spreadsheets...like retrieving for same month ???Absolutely, 100% sure.
    Also does the difference exists for all months retrieval or only for Jan retrieval?It starts in January and the difference continues for the rest of the months/years after. The amount it's off by changes each year, but remains the same for each month in the year. So Jan through Dec of FY13 are all off by 50,321,000. Jan through Dec of FY14 are all off by 186,378,000. Jan through Dec of FY15 are all off by 351,757,000.
    Also note that if you have a retrieval as shown in the screenshot in the following link... for the last 5 months (AUG to DEC) under FY11 will actually retreive for FY12. this is a wierd behaviour.No, I have the year above each month.
    Sabrina
    Edited by: SabrinaD on Aug 3, 2010 12:31 PM

  • Controlling the main time line of a movie via a button within a movie on a different level.

    Hi there!
    I have two movie is two different levels,
    Level 5 is my base movie and I am loading another movie on
    top of this into level 10.
    Once the user clicks onto a button within the movie on level
    10, I would like the animation in level 5 to stop (the animation
    runs on the main root timeline of level 5).
    Once the user clicks on a different button within the movie
    on level 10, I would like the animation on the main timeline of the
    movie in level 5 to start again from the point where it previously
    left off.
    Is this possible?
    It would be great if someone could help me out with this.
    Thanks, midi_ie

    midi_ie wrote:
    > Hi there!
    > I have two movie is two different levels,
    > Level 5 is my base movie and I am loading another movie
    on top of this into
    > level 10.
    > Once the user clicks onto a button within the movie on
    level 10, I would like
    > the animation in level 5 to stop (the animation runs on
    the main root timeline
    > of level 5).
    >
    > Once the user clicks on a different button within the
    movie on level 10, I
    > would like the animation on the main timeline of the
    movie in level 5 to start
    > again from the point where it previously left off.
    > Is this possible?
    _level5.gotoAndPlay("someLabelframe");
    Use your regular action to target timeline or movie clips,
    just define the level number at the beginning of the path.
    Pretty much it :)
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Error after creating Element level join between two different dataset in11G

    Hi Experts,
    My report is having data from two different datsets, I created two datasets and joined them with Element Level join. I am getting below error.
    "The following tags were not closed: DATA_DS. Error processing resource 'http://localhost:9704/xmlpserver/servlet/xdo'. "
    But independent datasets are executing with out any errors.
    Please let me know, If any one have inputs to resolve this.
    Thanks in advance..

    Hi,
    Can you please explain the resolution in more details. I'm also having the same issue in BI Publisher report when trying to join two data sets with Element Level Link. I have checked that all my columns have alias names.
    Thanks,
    Piya.
    Edited by: 947289 on Jul 18, 2012 5:56 AM

  • How to add two different page numbers in a single page

    How to add two different page numbers in a single page? One is for page number of the whole article, the other one is for page number for each chapter in the article.

    It's quite complicated, see
    Two Page Numbering Schemes in the Same Document.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Two iphones, two different phone numbers, same apple id, will imessages work?

    I have two different iphones on a family plan with verizon, phones A and B.  Each is associated with a uniqie Apple id, lets call those apple IDs C and D.  So Phone A has apple id C, Phone B has apple id D.  I'd like to register both phones to Apple ID C for in imessages, although the phone numbers themselves will continue to separately be registered to Apple ID C and D.  Once i do that, presumably all imessages sent to same apple id C's email address will appear on phones A and B.  But will imessages sent to phone B's phone number also appear on phone A, or will those only appear on Phone B?
    Many thanks.

    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime
    Yuu can also
    Create a NEW account/ID for her using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before. Make sure you specify a birthdate that results in being at least 13 years old
      Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    More details of how:
    http://ipadhelp.com/ipad-help-tips-tricks/how-to-get-free-apps-from-the-app-stor e-without-a-credit-card/
    Use the new ID on her iPod but only for:
    Settings>Messages>Send and Receive
    Settings>FaceTime
    Settings>GameCenter
    and Settings>iCloud if you want her to have separate Contacts Calendar and some other things.   
    Continue to use the same/common Apple ID for Settings>iTunes and App stores so you can share purchases.

  • I have two different 5s's with two different phone numbers but they are both using the same iCloud/apple account. After upgrading to iOS8 when I get a phone call on one phone both phones ring.

    I have two different 5s's with two different phone numbers but they are both using the same iCloud/apple account. After upgrading to iOS8 when I get a phone call on one phone both phones ring. One phone is for work and one is for private and I don't need both phones to ring from one call. It's bizarre.......is this supposed to be like this? If so where can I turn it off?? And while we are at it iOS8 has installed iBooks on both of my phones and iTunes won't let me uninstall it. I don't need or want iBooks on my phones.

    Hi,
    There are two easy fixes to this.
    One, you can set up Family Sharing, in which you can have two different iCloud Accounts, yet still share the same apps, music, media etc.
    Two, go to Settings and turn-off "Handoff". This can be found under the General page.
    Hope this helps!

Maybe you are looking for

  • Pixma MX432 wireless scanning function doesn't work

    I just purchased a Pixma MX432 multifunction printer. I set it up for wireless connection. The printer portion works fine. When I run the MP Navigator 5.1 to run the scanner, I get an error message: Canon MP Navigator EX has stopped working. A proble

  • How to Restore a file In Yosemite's Time Machine?

    Since upgrading to Yosemite, I am having difficulty figuring out how to restore a file using Time Machine.  When I select a file, and click on a recent date, the selected date does Not remain selected, and the "Restore" button is grayed out.  How do

  • Posting Period - Opening

    Hi CB, Thanks for the information. In our company,we maintain Fiscal year from November to October. Nov = first month. *Can you let me know what should i do now to open the period 2009/09* Thanks

  • ALE and IDOCS related docs!!

    hi , could u plz send me some docs on how to get started with idocs on [email protected] thx gunjan

  • WO basic start date - requirement date

    Good morning folks, Would anyone be able to shed some light on any config that would be suitable for the following: The materials are assigned to a task list that is then assigned to a plan.  That plan is then scheduled and the work orders are genera