4 Replies Latest reply: Feb 22, 2013 1:31 AM by Dhar RSS

    OBIEE: Link Two Separate Queries Together

    989912
      Hi,

      I am trying to link two separate queries together in BIEE.

      I have a query that will give me the sales value in January 2012 (monthly query)

      But I would need to use the sales value of January 2012 to help derive the weekly sales value in another query (weekly query).

      How would you link up two queries together?

      I tried using union but it doesnt seem to be working.

      Thanks.

      Bill
        • 1. Re: OBIEE: Link Two Separate Queries Together
          Srini VEERAVALLI
          Try something like as in this link
          http://www.cool-bi.com/Tweaks/JoinsinAnswers.php
          • 2. Re: OBIEE: Link Two Separate Queries Together
            Dhar
            Hi Bill,

            How about having an inner query. I mean, you could create an analysis to derive "sales value in January 2012" and create another analysis to derive weekly sales value based on january sales.

            This would send an inner query for January2012 and the outer query for weekly sales to the DB.

            Note: I personally prefer to avoid inner queries, but I see this as the best option at the moment though.

            Hope this helps.

            Thank you,
            Dhar
            • 3. Re: OBIEE: Link Two Separate Queries Together
              989912
              Hi Dhar,

              Thanks for your reply. I am fairly new to BIEE. Is there anyway you can explain a bit more how to set up an inner query?

              Billy
              • 4. Re: OBIEE: Link Two Separate Queries Together
                Dhar
                Hi Billy,

                Sure, My pleasure. Here are the basic steps what you could go through.


                1. Create an analysis with your Month (January) and Sales.

                2. Save this analysis as Report1.

                3. Create another analysis with Week and Sales.

                4. Create a filter on column:Sales using the option 'Based on Another Analysis'. The analysis editor will provide you an option to browse your other analysis which you want this analysis to be based on and just click on this browse button, and navigate to and select Report1.

                5. Once you have selected Report 1 through browse option, you get down in the same pop-up the relationship and use values in column.

                So sample entries in this pop-up might look like

                Column : Sales
                Operator : is based on results of another analysis
                Saved Analysis : /My Folder/Report1
                Relationship : is equal than
                Use values in Column : Sales

                6. If you run this analysis, you could get all weekly sales figures which are equal to the january sales figures.

                Hope this helps.

                Thank you,
                Dhar