Two Queries In One Workbook With Calculations

Hi Guys,
Can you have 2 queries in one worksheet, either ran as a query or save as a workbook and calculation done at runtime.  For example, query A and query B to show up in one sheet when you run query A.  You now want a simple calculation done......for example.......A1 row from query A divided by B1 row from query B.  The result to show up on the Key Figure structure in query A.
Thanks,
Recca
Edited by: Recca Recca on Jul 11, 2011 4:45 PM

Hi,
I am not sure about this but we had similar kind of requirement and what we did was,
One query in one tab, another query on second tab and we did key figure calculations on third tab of the workbook eg. Sheet1 A1 - Sheet2-A1 and the result was stored on sheet3.
We saved the workbook and used to refresh the same whenever we want to see new data.
Regards,
Durgesh.

Similar Messages

  • Max. number of queries in one workbook

    Hello experts,
    is there a mximum number of queries which can be embedded in one workbook?
    What are the disadvantages of using many queries in one workbook.
    Are there other disadvantages for input ready queries?
    Thank you
    Johannes

    Johannes, to follow up on Rakesh' answer, your performance will depend on the amount of data you are pulling out with the queries.
    as for the additional disadvantages - unless you use the BExGetData formula, formatting will be your primary issue.  Also, when you create buttons for the input ready query, the only time you get to set what Data Provider you are using is when you first code the button.   After that, you would need to recreate the button to ensure that you are pointing to the right query.
    the advantages are that you can model your reporting requirements any way you want (for example we use two multiproviders with different characteristics and use 6 queries to pull the data out)
    Pavel

  • Combine Queries in one workbook

    Hi guys,
    I am looking for a way to combine multiple queries in one workbook.
    For example: If I set a filter in one query to the month November, the same filter (e.g. November) should apply to all other queries (which are on another worksheet or on the same worksheet).
    How can I do this?
    Many thanks,
    Sabin

    Hi Sabine,
    You have two options:
    1.  the easy one is to use same variables in the refresh screen for all queries in the same workbook; if you do this, then use the "refresh all queries" option, you will get the same restrictions applying to all queries in the workbook simultaneously.
    2.  the more difficult way to do this is to use a lot of Visual Basic.  Using Visual Basic, you can "read" the filter value set on a particular query, then "apply" that filter value to every other query in the workbook.  OR, you can use the "Copy Filter Value" function.  I prefer the latter for a number of reasons.
    From your earlier notes, I assume you want to use option 2.  To help you further, it would be useful to know what version of BW you are using, and how your users typically refresh queries (i.e., with a button in the workbook, or using the Business Explorer toolbar?).
    It would also be helpful to know your level of comfort with VBA in Excel.
    Here are some notes on the "Copy Filter Value" function:
    Function SAPBEXcopyFilterValue(fromCell As Range, Optional atCell As Range) As Integer
    • Return value of zero indicates that no errors were encountered.  Otherwise, function returns number of errors encountered.
    • If atCell is not specified, the active cell is used to determine which characteristic to return information for.  If the active cell is not part of a query definition, then function returns an error state.
    • Characteristics (fromCell and atCell) must have same technical name; for example, cannot copy filters for Ship-to (0SHIP_TO) in Sales cube to Ship-to (YCOCUSSH) in a Shipments cube
    • Queries (copying from and to) must be in same Excel Workbook.
    Sub CopyFilterOnce()
    Dim filterRng1 As Range, filterRng2 As Range
        'in this example, we are copying filters from query on sheet
        'with code name Query1 to query on sheet with code name Query2
        Set filterRng1 = Query1.Range("F10")
        Set filterRng2 = Query2.Range("D13")       
        retVal = Run("SAPBEX.xla!SAPBEXcopyFilterValue", filterRng1, filterRng2
    End Sub
    Hope this helps.
    - Pete

  • Parallel Refresh queries in a workbook with BI7.0

    Hi Experts,
    could somone tell me if is it possible to refresh IN PARALLEL all the queries in a workbook with 7.0 version? are there any differences from 3.5 Bex version from this point of view?
    This kind of option would be  very usefull for long run queries and/or big ammount of queries collected  in a workbook.
    I would be really grateful if you can give me link to documentation on this point.
    Thanks very much
    Best Regards
    Filippo Corvi

    Hi
    You are correct, if we put the big queries in a workbook it would be a performance issue.
    I have to check the option of refreshing the queries parallely.
    But you can try one option, the workbooks are also refreshed in Precalculation Server. If you can schedule that then the users would not have a problem.  May be I am wrong in this option. But it would be like refreshing the statistics before using them.
    If you can tryout, this is the help
    Note 936112 - Precalculation server help for troubleshooting
    Also this is one more option, but I had not tried out
    Schedule a Refresh of BEx Workbooks

  • How to Combine two queries into One

    Hi Gurus,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    I have following two queries. How I can convert these two queries into one with the same result ?
    Q1
    SELECT id,vdate,vendorname,venddate,vid
    FROM VENDOR
    WHERE processid=32
    AND venddate is null
    AND vid in(select vid from view_vid where type='PDX')
    AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=55)
    AND (id,vdate) in (select id,vidate from market_data where marketed_date is null)
    AND id not in (select id from location)
    Q2
    SELECT id,vdate,vendorname,venddate,vid
    FROM VENDOR
    WHERE processid=20
    AND venddate is null
    AND vid in(select vid from view_vid where type='PBX')
    AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=40)
    AND (id,vdate) in (select id,vidate from market_data where region_date is null)
    AND id not in (select id from location)
    I can UNION these two queries, but, is there any way I can write a single query with which gives me same result as above two queries?
    Any help would be highly appreciated
    Thanks in advance

    Hi,
    You can do something like this, which will be more efficient than a UNION:
    SELECT  id, vdate, vendorname, venddate, vid
    FROM  vendor
    WHERE  (   (    -- Conditions that apply only to q1
                               processid = 32
                AND  vid       IN (SELECT vid FROM view_vid WHERE type = 'PDX')
                AND (id,vdate) NOT IN ( SELECT id, vdate
                                        FROM   vkfl_is
                                        WHERE  task_id = 55
                AND (id,vdate) IN ( SELECT id, vidate
                                    FROM   market_data
                                    WHERE  marketed_date IS NULL
            OR  (  -- Conditions that apply only to q2
                     processid = 20
                AND  vid       IN (SELECT vid FROM view_vid WHERE type = 'PBX')
                AND (id,vdate) NOT IN ( SELECT id, vdate
                                        FROM   vkfl_is
                                        WHERE  task_id = 40
                AND (id,vdate) IN ( SELECT  id, vidate
                                    FROM  market_data
                                    WHERE  region_date IS NULL
                   -- The remaining conditions apply to both q1 and q2
    AND     venddate   IS NULL
    AND     id         NOT IN (SELECT id FROM location)
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • If you registrate one Apple ID for each iPhone/iPad, you'll get 5GB on iCloud for each Apple ID, right? I have two iPhones and one iPad  with the same Apple ID, why can't I get 5 GB fo each of them?

    If you registrate one Apple ID for each iPhone/iPad, you'll get 5GB on iCloud for each Apple ID, right? I have two iPhones and one iPad  with the same Apple ID, why can't I get 5 GB fo each of them?

    Actually, everyone missed one point, when a device is priced, the cost of icloud storage space for that device is also included in it that is why they are able to give you 5gb each for each user ID, in nutshell there is nothing free coming with apple device purchase, it is paid for.  What they are trying by giving only 5gb per user ID irrespective of the number of devices used is pure broadlight looting, they take money from you when you buy each device and give you nothing, This is a case of goods and services bought but not fully deliverd ie apple can be suied for discreminatory treatment towards it's users. I wonder why no one tried this yet in America where everyone sue everyone for petty things..... there is no one to take up this issue? . if tim got any love for the guys who shell out money for the devices his company makes, he should be implimenting this as priority before someone wake up from sleep and sue him.

  • I accidentally set up two accounts.  One account with my old e-mail address which I've been using for years and has all of my purchases on it.  Now I have a new account with my current e-mail address. How do I disable this new account?

    I accidentally set up two accounts.  One account with my old e-mail address which I've been using for years and has all of my purchases on it.  Now I have a new account with my current e-mail address. How do I disable this new account?  I need to disable the new e-mail address account so that I can add it as an additional e-mail to my old account.  THEN, how do I make this new e-mail address my primary e-mail for this old account?

    Did yoo go to Settings>iTunes and App Stores and sign out and sign back in?
    Next see:
    Frequently Asked Questions About Apple ID

  • I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    Thanks - I guess it is like there were two of me!
    I bought the iPhone first and it seemed natural to link it to the (work) e-mail address which was in constant use. The iMac for home use came next and it seemed natural to use my home e-mail address, particularly as I knew by then that I would lose the work address after my imminent retirement. The same logic went for the recent puchase of the MacAir. I am not sure what happened with the iPad (also a recent purchase) - iTunes seemed to puch me towards the same ID as the iPhone.
    It is not a huge problem - just makes my persona look schizoid! Otherwise very happy with everything Apple.

  • Two Queries in one XSQL-Template

    Hi there,
    is it possibile to use two queries in one xsql-template, which are generated two seperated trees of XML?
    I think about something like that
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsql:query connection="bynet"
    null-attribute-indicator="true"
    xmlns:xsql="urn:oracle-xsql"
    rowset-element = "COLLECTION"
    tag-case="upper"
    row-element = "FIELD"
    id-attribute = "">
    select c_formtype from offer_collection
    </xsql:query>
    <xsql:query connection="bynet"
    null-attribute-indicator="true"
    xmlns:xsql="urn:oracle-xsql"
    rowset-element = "COLLECTION2"
    tag-case="upper"
    row-element = "FIELD"
    id-attribute = "">
    select c_formtype from offer_collection2
    </xsql:query>
    which should give me
    <COLLECTION>
    <FIELD>
    <C_FORMTYPE>lala</C_FORMTYPE>
    </FIELD>
    </COLLECTION>
    <COLLECTION2>
    <FIELD>
    <C_FORMTYPE>lala</C_FORMTYPE>
    </FIELD>
    </COLLECTION2>
    Any way to do this?
    Thanx for help,
    Christian Hartmann

    Sure, just enclose two <xsql:query> tags by any other outer tag:
    <something xmlns:xsql="urn:oracle-xsql" connection="demo">
    <xsql:query> select * from emp </xsql:query>
    <xsql:query> select * from dept</xsql:query>
    </something>

  • Combining two queries in one..

    Hi,
    Can someone tell me how to combine follwoing two queries in one so that it will increase performance..
    SELECT single PLNNR from AFKO
           into T1
           WHERE AUFNR = '007200000100'.
    SELECT single STATU from PLKO
           into T2
           WHERE PLNNR = T1.

    using subqueries it is possible
    select single statu from plko into t2 where plnnr in (select single plnnr from afko where aufnr eq '007200000100').
    read about subqueries at this link...
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/dc7614099b11d295320000e8353423/frameset.htm
    regards,
    PJ

  • How to combine two queries in one EXCEL

    hi i got one requirement
    i got one excel sheet  from user which contains two  report s(hoe we know whether it is worknook or not) of  2011 data and now user wants 2012 data .now i icluded jan 2012 to dec 2012 in two reports and sent to user.But user is asking these two reports want to see in one sheet.
    so how can i proceed: if i go for work  book  how can i include these two reports in workbook and here my doubt is if i create a workbook based on  these two querie which name i have to give user.Please help me out on the same.
    Regards,
    Madhu.

    Hi Madhu
    Run one query. Click on a empty space in the excel
    From the BEx Design Toolbar -
    >Insert Analysis Grid -
    > Right click on the Design Item
    Edit the DataProvider.....You can ran same or different query with selection. 
    Save the result
    Check this link for detail....I am also searching for something with screenshot
    Regards
    Anindya
    Edited by: Anindya Bose on Feb 14, 2012 3:04 AM

  • Two Queries in one Worksheet

    Hi,
    I'd like to know what the disadvantages are of having two queries in the same worksheet of a workbook. Is it correct that the results of one query can overflow to the area of the second? How about issues with authorization, are there any?
    Thanks!

    HI,
    Yes, result of one can flow over the other if you are using simple report with characteristics and output may vary.
    Actually you apply basic Excel logic and its like 2 diff report on it.
    Mostly you add more Fixed format reports to a single sheet. So that  number of report rows dont increase and also you dont have any free characteristics to drilldown.
    About authorization, that depends on individual reports. If a user doesnt have proper authorization for 1 of the reports then that report would throw error while other would show result.

  • Combining multiple spreadsheets into one workbook with excel

    Im working on a project that requires a workbook with all the raw and calculated data merged into one excel workbook. Currently I have all the sheets saved separately but for the life of me can't figure anything out from the examples i've seen so far. How would I Initially go about doing this?

    Why save the spreadsheets separately?  Can you combine them from the gitgo using the Report Generation toolkit.  How are you collecting the data?  Is the data entry done manually or is it automated?  From your post, it seems you collect the data by some other means other than with LV, but you want to merge the data with LV, correct?
    Take a look at the example finder if you haven't done so.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

  • Two queries in one output in BEx is it possibl ?

    Hi,
               Is there a possibility in Bex Excel screen that we can output two queries at the same time , like 1st query in first half and second query 2nd half of the screen .I think its not possible but just wanna know if anyone came across such an issue
    I know it is possible with WAD ...

    Hi Raj,
    You can execute 2 queries in one work book.First execute one query,place the cursor under query results area,go to tools->Insert query->execute.Save->Save existing work book.
    When ever u open the work book u have to execute both the queries.Instead of executing twice you can use some options, so that it saves and reuses the input values and automatically refresh the queries when u open the work book(If the input values are fixed).
    For that right click->Properties->Intraction tab
    You can see 4 check boxes.check all boxes,ok for all queries and save.So when u open the work book it retrieves data.No need to give input values

  • How do we sync contacts and calendars (ONLY) between two iCloud accounts, two iPhones and one iMac with two user accounts?

    This is complex.  Until today we had one iMac with two user accounts - one for me and the other for my wife.  We sync'd our calendars and contacts between our two user accounts using my iCloud account, thereby keeping our schedules coordinated and our contacts information always the same between us.  Also, as I had an iPhone, I sync'd my phone with my iCloud account, thereby keeping the contacts and calendars in the two user accounts on the iMac AND my iPhone sync'd.  (I also sync'd other things, like Notes and Mail and Safari settings, between my iPhone and my user account on the iMac, but my wife did not want to be burdened with all my emails showing up in her email account and I wasn't interested in hers, etc., so we didn't sync anything between us other than calendars and contacts.)
    We've finally bought my wife an iPhone and set up an iCloud account for her.  And of course she now wants to sync several items from HER account on our iMac to HER iPhone, but I don't want them, just as she doesn't want all of my other stuff.  But we still want our mutual calendars and contacts to sync to HER new iPhone, just like they already do to mine.  But I can't figure out how to CHANGE her iMac user account from using MY iCloud account on the iMac to using HER new iCloud account, and then having HER iCloud account speak to MY iCloud account but share JUST our calendars and contacts.
    Originally I tried a workaround by simply having her iPhone log into my iCloud account.  That works great for the calendars and the contacts.  But...she can't sync anything else from her iMac account to her new iPhone because she's presently "forced" to use my iCloud account.  And neither of us want to sync our other things to each other's iMac accounts or iPhones.  Also as we're both using my iCloud account, in things like the Find My iPhone app, the Cloud is seeking two phones labeled with my name and none with her's.  So we definitely don't want this as the set-up and communications network between our devices.
    We want to set up our users on the iMac to sync to our SEPARATE AND DIFFERENT iCloud accounts and then have those iCloud accounts sync calendars and contacts (ONLY) between themselves, and then push that data to our separate iPhones (or the other way, from either of our iPhones to the individual accounts on our iMac and the other person's iPhone).  Does this description make sense to you?  I've diagramed it nicely using Keynote, but even thiough I can draw it, I can't figure out how to set up and configure all the devices to make it work.  If you would like me to send the Keynote slides (just two of them - the current and desired configurations - please send your email address to me at [email protected] and I'll be happy to forward it to you.
    If anyone can help me set this up I'd be most appreciative!  Thanks so much.  Merry Christmas and Happy New Year to all readers in this community!

    BobT.
    I had the same problem, and decided to look into it last night.
    First of all, the solution I would like to have is for Apple to allow for selection of iCloud accounts per application, i.e. Contacts to one, Photo Stream to another. I believe this would be the most straight forward solution for the problem we are facing. 
    Since this is not an option I came up with a workaround. I was most interested in solving this for Contacts, so this is what I tested for. Now I have all 3 devices with the same contacts.
    1) Turn off iCloud for Contacts on all devices. On the device that has the Contacts list that you would like to propagate to all others select to keep the contacts, and on the others select not to keep them.
       Note that the current backups still exist on iCloud, so in case something goes wrong you can still turn the iCloud for Contacts back on to get your current Contacts back.
    2) In iTunes, sync All Contacts with the phones, starting with the one with the Contacts content you chose to keep.
    From this point on, the 3 devices should sync contacts with each other.
    This, of course, will stop your iCloud backups of Contacts, but I don't think this is really needed. You are already storing copies of your Conacts on 3 devices, which for good parts of the day are likely not all co-located. You also potentially have Time Machine backups turned on, which would mean there is a 4th copy there as well. For the case of Contacts iCloud only complicates matter ... that is until Apple implements the solution I first wrote about.

Maybe you are looking for

  • Wav vs. ID3 = nobody can solve this problem !

    Hi. I have a big quesion for you guys. Check it out. I have almost 800 wav files on my external drive #1. I have entered the information for every tracks in iTunes (quite an big big big job!). The thing is, i know the wav files does not keep this inf

  • Encore CS4 Start-Up Problem

    Hi, When I try to open Encore CS4, either by creating a brand new project, or by using dynamic linking to bring in a short sequence from Primiere Pro, I get about 80% through the progress bar labeled "preparing transcoder settings" when I get the fol

  • Why can't I clear the queue on my laptop.

    I have a Photosmart  C6380 all in one printer on a net work and one of the computers has a document in the queue that will not cancel .  The laptop is a HP    pavilion dv6000 running windows 7.  I have tried to cancel the document with no success, it

  • New iTunes security changes

    New system I see?

  • Ios 6- wifi does not connect

    hi, My iphone 5 with ios 6.01 doesn't connect to my office wifi network. My office wifi network requires us to authenticate our login via a pop up browser which is not happening now Earlier, moment I connect to office wifi pop up webpage would pop wh