Formula in workbooks

hi all
i have created a workbook with sheet1 and sheet2.
now in sheet2 one of the rows needs to be calculated .
ex:
result from sheet1 = zres1
result from sheet2=zres2
now below zres2 ,i want to add another row ,which is zres1-zres2.
how can i achieve this.is it possible?
your thoughts plz.
thanks,
srinivas
Edited by: srinivas reddy on Jun 16, 2009 5:04 PM

Srini,
If the position of zres1 and zres2 are constant relative to their result areas (for eg, if zres1 always appears at the bottom right corner of the result area of query 1), you can use a VB macro to get the values of both of them, subtract them and put the result wherever you want.
For info on VBA macros in Bex 3.5: [http://help.sap.com/saphelp_bw21c/helpdata/en/f1/0a55f9e09411d2acb90000e829fbfe/content.htm|http://help.sap.com/saphelp_bw21c/helpdata/en/f1/0a55f9e09411d2acb90000e829fbfe/content.htm]
If you can be little more clear about your scenario i.e. where do zres1 and zres2 get displayed in their respective query result areas, where do you want the result to be displayed etc, it will be helpful.
Edited by: Suhas Karnik on Jun 18, 2009 8:51 AM

Similar Messages

  • Excel Formulas in Workbook

    Dear all,
    I'm using bex analyzer 7 and I have a workbook which has many sheets.
    I need to use some excel formulas on every sheet but in every refresh my calculations has been deleting.
    And i also  need to use some hidden columns but on every refresh they are showing.
    It's not possible to do calculations or use hide property on designer.
    Any tips?
    Kind Regards
    Nil

    Hi Nil,
    Glad to hear that my suggestion worked for you,
    To calculate sum of two differenct row for cumulative result user the following code
    Lets take row number 3 , below code will calculate the sum for row 3 till end ( stop if find empty cell) and give the total into the next to last cell,
    put this code  into a function module and call on change event
    Dim icol As Integer    ' to calculate column number
    Dim isum1 As Double ' to calculate sum of the one row
    Dim ctr As Integer    ' to find the col last column
    icol = 1
    isum1 = 0
    ctr = 1
    Do While Len(Cells(3, icol)) > 0
        isum1 = isum1 + Cells(3, icol)
        ctr = ctr + 1
        icol = icol + 1
    Loop
    Cells(3, ctr).Value = isum1
    you need to specify the Row number ( hard code) and change the value for variable icol ,
    icol=1 means , it will start calculating the values from Col A ( change as per your worksheet)
    using the same code you can find the sum of another row ( isum2) and
    itotal = isum1+isum2
    Please let me know if you have any questions.
    Hope this helps
    Sukhi

  • Formulas in Workbook causing the Workbook to open very slowly

    Hi Everyone,
                       I have a very long pending issue fro our users. We have a workbook which has two queries inserted.  And there is a Formula which is hardocded up to 5000 rows. And due to thiis workbook is opening  very slolwly.
    The Formulas is
    =IF(BExGetData($X$3,$X$6,$B13,$X$4,$X$5,$G13,W$11,W$12)="#NV",,BExGetData($X$3,$X$6,$B13,$X$4,$X$5,$G13,W$11,W$12))
    The above formula replaces #NV value with a blank  and then if there is any other value  apart from #NV, then it calculates a different value in the back end. Since the business , does not know  howmany rows of data comes, so he hardcoded the formula for 5000 rows as this is the maximum count.
    Can anyone please provide a solution to avoid so many hardcoded formulas and have an alternative using some macross.
    Please feel free to ask questions?
    Regards,
    A

    Any ideas on this.............. This is a IP  Workbook . Basically  the formualas are written to 5000 times in the workbook to perform those functions. So, when there are no 5000 rows of records, then also formulas are calculated. Is there any way to write a Macros for the same and  include the formula once in the  Workbook and loop itusing macros code. And this loop should work for the no.of rows that are present in the workbook. may be 1 rowto 5000 rows and so on.
    Regards,
    A

  • Formulas in workbooks (BexSetData)

    Hi
    I have created a planning workbook and turned on Formula mode. The BexSetData formula appears in all input ready cells. When I change the value in the BexSetData to a cell reference (and not the planned value) I do not get any errors. Everything works fine until I click on Save (standard SAP planning button for saving plan data). Then the cell reference in the BexSetData formula is replaced with u201Cu201D. No value is also written to the BI planning cube.
    Is this an error or do I need to do some extra settings for making this work properly?
    We use BI 7.0 and Stack 17 (sap_bi 19).
    Kind regards
    Erik

    Sorry we currently do not support field calculations. You can vote for the feature here:
    http://forums.adobe.com/ideas/1911
    We use this to help prioritize our work.
    Randy

  • Can I use Power Query to Import a table from Excel sheet range which starts not from the top row?

    Hi,
    Being an experienced Excel user before Power BI, I am just starting to explore the M and Power Query capabilities, and need help already (ain't easy to google this use case somehow):
    I need to import the table which sits in the Excel file with header row in the row 17 of Excel sheet, with some metadata header in the preceding rows of the columns A and B.
    01: Report name, Quick Report
    02: Report Date, 1/1/2014
    17: Employee Name, Manager, etc...
    18: John Doe, Matt Beaver, etc.
    Both (a) direct attempt to load as Excel file and (b) the indirect way through [From Folder] and formula in custom column -- both lead to the same error: "[DataFormat.Error] External table is not in the expected format."
    Specifically, I tried to use the [Power Query -> From File -> From Folder] functionality, select an Excel file and add a custom column to access the binary content: [Add Custom Column] with formula "=Excel.Workbook([Content])".
    It looks like Power Query expects a rectangular range with headers full-width followed by a contiguous table range to import anything, and refuses to load if that is not the case...
    QUESTION: Is there any way to load whatever-formatted data from Excel first, and then manipulate the overall imported range (like referring to rows starting from 17th using "Table.SelectRows" etc.) to read the actual data? Reading and using
    the metadata from header would be a bonus, but that comes second... The main issue is to get something from a non-regular Excel file to later work with using M formulae ...
    Thanks!
    SAM

    Finally found the answer to this one in ():
    You Cannot Open a Password-Protected Workbook
     If the Excel workbook is protected by a password, you
      cannot open it for data access, even by supplying the correct password with
      your connection settings, unless the workbook file is already open in the
      Microsoft Excel application. If you try, you receive the following error
      message:
    Could not decrypt file.
    ANSWER: So, will have either weave in the work with temporary unprotected files or requires opening them before updating the data source (although this almost defeats the purpose of automation...)
    ANSWER to ORIGINAL QUESTION: password was preventing Power Query from reading the Excel file. For solution see above.
    Thanks anyway for participation and inspiration, Imke!

  • How to sum period on a liability account

    I have a requirement to show aggregated amounts of a liability account, for a given FY.
    LIABILITY1  for AUG should show the sum of first 8 months liability, i know it is a behavior of expense account on a liability account. For clarity sake,
    LIABILITY1 will be a stat account created using actual LIABILITY account using MDX formula.
    1) Tried defining LIABILITY1 as EXP account where in the MDX has it as "= LIABILITY"   It didn't do the trick to mimic exp aggregation behavior for year total.
    2) Custom measure is an option but i would like to look other options as custom measures are performance hogs.
    Please note , excel formulas as workbook solution are not accepted here.

    Thank you all for looking into my query and sharing your thoughts. Let me clarify the requirement further.
    -  Liability (LEQ)  accounts are YTD accounts
    -  My application storage type is Periodic.
    -  When you report on this Liability account we always get the "point of time" value i.e. when you report for AUG  , it will always display the balance as of AUG,  irrespective of the application storage type. No issues here.
    Requirement
    -  I need to report accumulated balance of this account i.e. sum of all prior month end balances. When reporting for Aug i have to show the sum of YTD balances from Jan to Aug
    - We can create a new account to achieve this and have an MDX to calculate the sum
    - We can create a custom measure to mimic INC account behavior on LEQ account
    - We can use script logic to calc and store into new account
    - We can use write back to store this calc into new account
    - Not sure what other options I can explore
    - Workbook based excel formula is not an option
    I am trying to find the efficient approach to achieve, if possible, to learn from others experience on similar requirements. We have huge data volume hence efficiency is paramount.

  • Workbooks not working in formula mode

    Hi ,
          I have created a workbook in formula mode. When I refresh and enter new variables, then those are not being taken into account. Workbook still shows original data with key figures being displayed as "#NV". Please advise.
    Full points promised....
    Thanks,
    Kartheek

    Kartheek,
    In the following answer, I am assuming that you are using text variables (e.g. in the columns) and that you have used the right mouse click > convert to formula option (rather than the 'Use Formula' setting against the Analysis Grid).
    If so, then something like the following is probably occurring:
    1. Bear in mind that when you convert to formula the design object is stripped from the analysis grid: i.e. it is no longer updated with the formatting of the query object
    2. You run the query for November forecast in the first instance - this is what was there when you converted to formula and therefore data appears because Nov appears in the column heading which the bexget formula points to.
    3. You then change the variable value to July, but as the analysis grid is no longer updated the column still says November - therefore the bexget formula returns #NV because it does not have the data for November any longer. If you overwrote the Nov value with July, the data would appear...
    To get around this, insert the dataprovider again, do NOT convert this new one to formula and refer your bexget formulas to the columns / rows in this DP as they will be updated dynamically by the system. Therefore as your variable values change so will the column headings etc. and therefore bexget will return the expected data. You can then hide these rows etc.
    Hope this helps,
    Keith

  • BI 7.0 Workbook excel 2003 formula for comparision

    Hello Friends I have a requirement to create a workbook in BI where I have 7 columns on left side of excel workbook and 7 columns on right side of excel workbook in the same sheet of workbook. so Requirement is to put the Code 0, 1, 2, 3,4,5,6
    if column 1 on left match with column 1 on right and like that column 2 on left match with column 2 on right
    But the below excel formula is not working it always give me 7 which is a false value even though the data in columns 1 & 1 match each other
    Can u please suggest me the step by step formula or any VB Code that I can put to get this done. I am not good in VB so please tell me the exact steps. thanks for all sdn help
    formula not working
    =IF((E15=V15),0,IF((F15=W15),1,IF((G15=X15),2,IF((H15=Y15),3,IF((I15=Z15),4,IF((J15=AA15),5,IF((K15=AB15),6,7)))))))
    Thanks
    Soniya

    I'm afraid I haven't made my question understood clearly.
    What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
    Please advice.
    Thanks in advance,
    Shady

  • Ghost Excel workbook opens each time I start excel and prevents formulas - tried all suggested solutions without luck

    Hi
    When I start excel and open any workbook a 'ghost' work book opens it doesn't contain cells and is just greyed out. When I am working on a document whenever I start to write a formula the ghost wbook opens and I cannot see the original document to complete
    the formula. If I open multiple workbooks I sometimes get a ghost workbook for each doc that is open - after a while I get error message to say not enough reources to do even simple tasks like save work or open a document.
    I have posted on several forums and tried all suggested solutions without luck - this is really preventing me from using excel which I need daily. Personally though I am only intermediate user I think it may have something to do with a workbook that I downloaded
    that had macros in it but I cant be sure
    Any help greatly appreciated
    Thanks
    Dave

    Hi Dave,
    First make sure have installed the latest update. Second, we can repair Office 2013 from Control Panel > Programs and Features. Third, open Excel 2013 in safe mode, if it works fine, disable some 3rd-party application add-ins.
    Could you please share a screenshot of this “ghost” workbook and upload it to OneDrive? I’ll analyze it in detail as soon as accessing it.
    If there is anything about this issue, don’t hesitate to tell me.
    Best regards,
    Greta Ge 
    TechNet Community Support
    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support
    teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.

  • Applescript: Need help to write a script that inputs an excel formula into multiple workbooks.

    Don't know if I can do this with automator or if I need to write a scipt I have a folder which contains probably 20 excel workbooks and each workbook needs the formula "=CONCATENATE(E17, " ",TEXT(N11, "mm-dd-yy"))" into cell T18 in every sheet of each workbook. Any ideas?

    well, the operative line is this:
                                  set formula of cell "T18" to "=CONCATENATE(E17, \" \",TEXT(N11, \"mm-dd-yy\"))"
    you just need to loop through the workbooks and worksheets and apply it to each.  I think you can figure that out.

  • BI 7.0 Bex Analyzer Workbook - Convert to formula function features

    Hello,
    when using the convert to formula function in a BI 7.0 Bex Analyzer Workbook (WB)  the result area becomes completely static.
    1.) Is there a possibility to add drill downs / across into an already converted to formula WB?
    2.) I inserted drop down boxes to allow F4 like selections, however those are pointless if several characteristics are being used i.e. the keyfigure results get blanked out. Is there another way to do this at all?
    3.) Could someone provide me with a real live example / whitepaper how the convert to formula function can be used?
    Many thanks for any feedback on this.
    Regards
    Christian

    >
    ChrisAC wrote:
    >
    > 3.) Could someone provide me with a real live example / whitepaper how the convert to formula function can be used?
    >
    > Many thanks for any feedback on this.
    >
    > Regards
    >
    > Christian
    It does become static and all the workbook gets all the excel property.
    The key figures are now calulated on the basis of your data provider from the server as a formula in each cell..
    I had used to populate my key figure only for the required values of a characteristic.

  • Information Broadcasting Excel Workbooks with Local Formulas

    We are attempting to use information broadcasting to send out reports that use the v7 BEX "convert to local formula" feature in order to reformat the reports.  We can execute the reports, and even save them to a local client and review them later when disconnected from the server.    However, if we use information broadcasting to send these Excel files out as attachments, the users are unable to see the data unless they connect and refresh, defeating our entire purpose of putting the data in excel.
    Has anyone else attempted to Information Broadcast BEX Excel workbooks while using the Local Formula mode provided with v7?  Were you successful?

    Yes, I see some information in the precalc log, but nothing that seems to be wrong:
    04-11-2008 11:15:13 -> RS_PREC_GET_SERVER_STATUS invoked in thread 8
    04-11-2008 11:15:13 -> Locking MapSessionid in getFreeInstances in thread 8
    04-11-2008 11:15:13 -> Locked MapSessionid in getFreeInstances in thread 8
    04-11-2008 11:15:13 -> Unlocked MapSessionid in getFreeInstances in thread 8
    04-11-2008 11:15:13 -> RS_PREC_GET_SERVER_STATUS finished in thread 8
    04-11-2008 11:15:19 -> RS_PREC_GET_SERVER_STATUS invoked in thread 5
    04-11-2008 11:15:19 -> Locking MapSessionid in getFreeInstances in thread 5
    04-11-2008 11:15:19 -> Locked MapSessionid in getFreeInstances in thread 5
    04-11-2008 11:15:19 -> Unlocked MapSessionid in getFreeInstances in thread 5
    04-11-2008 11:15:19 -> RS_PREC_GET_SERVER_STATUS finished in thread 5
    04-11-2008 11:15:19 -> RS_PREC_GET_SERVER_STATUS invoked in thread 3
    04-11-2008 11:15:19 -> Locking MapSessionid in getFreeInstances in thread 3
    04-11-2008 11:15:19 -> Locked MapSessionid in getFreeInstances in thread 3
    04-11-2008 11:15:19 -> Unlocked MapSessionid in getFreeInstances in thread 3
    04-11-2008 11:15:19 -> RS_PREC_GET_SERVER_STATUS finished in thread 3
    BR Mikkel

  • Workbook : BexGetData( ) Formula.

    Hello Experts,
    I am trying to save a workbook developed in BI as an excel. I have used BexGetData( ) formula to map the data from the corresponding infoObjects from the infoprovider.
    But it is not saving as an excel. A blank worksheet appears while opening it.
    Please let me know your expert comments on this.
    Regards.

    Hi Richa ,
            Open the same workbok again and in design mode select the analsysis grid and assign data provider .do all necessary requirements and DO NOT Save it as it is .Go for save as option and give new name for it , &Save , close it .When you open it next time it will be available.
          Its a Std problem with BI 7.0 because of  improper config .
    You cannot do any changes to existing workbook and save .You can save but changes wil not be effective when you open it next time .you have to go for save as .
    Regards
    Vels

  • FOX Formula works in IP Modeler but not in BEx Workbook

    Hi, I've created a FOX function to do a series of actions.
    If I test the function with a simple filter and execute with trace in Modeler I get exactly the results I want. For example, 5 rows read, 4 rows modified, 4 rows deleted.
    If I add the function as a button on a workbook associated with a data provider (input-ready query) I only get 5 rows read but no rows modified or deleted.
    What is happening? Is there a way to know exactly why he is reading the data but not changing it as required? I think the function is reading the same set of data because it is finding 5 rows in both cases. Any ideas on how I can debug the function or find what what kind of data the function is reading or not reading so that it doesn't execute the code?

    One final question. I am trying to use the sequence in the workbook. I want the variables used by the sequence (in the planning function) to take the values that I entered in the query when entering the workbook. I am using the same variables in both places.
    CMD                                         1 EXECUTE_PLANNING_SEQUENCE
    PLANNING_SEQUENCE_NAME 1 PL06_PS01
    VAR_NAME_1                           1 FISCY
    VAR_NAME_2                           1 Y_VERSION
    VAR_NAME_3                           1 YBP_FCTR_INT
    If I execute like this I get error messages saying I am missing VAR_VALUE_1 and so on but the sequence executes as I intended. What is happening? Do I need to add the VAR_VALUE lines? I don't think so... so why the error messages if the sequence is running and working properly now?
    Additional points will be distributed for help on this issue.

  • I'm a "voice over" user.  I need to be able to access my xl workbook.  How do I convert the file to "numbers" So my formulas work/?

    Not sure why my question ended up in the subject field... However  I need help:)

    Numbers should be able to open your Excel document. It will convert on the fly as it is opened. Once open, it's no longer an Excel doc. It can be exported back to Excel, but none of the features unique to Numbers will be preserved, and the results are sometimes a surprise in terms of layout.
    Jerry

Maybe you are looking for