Tuesday, May 28, 2013

OBIEE 11g Multiple Values in single column using the advance tab and similar way in the Criteria Pane

Multiple values in single column using union operator in the advanced tab and using the operators in the selected column
For my example,
I am creating two analyses both with two columns
  •   Product – Brand and Base Facts - Revenue
  •   Product – Type and Base Facts- Revenue

Step 1

  •         Create an analysis with Product – Brand and Base Facts - Revenue
   

  •          Go to the advanced tab and copy the SQL
         

  •          Without closing the window, create a new analysis

Step 2

  •  Create an analysis with Product – Type and Base Facts- Revenue
  • Then go to the advanced tab, under SQL Issued click on New analysis

  •              In the Analysis Simple SQL Statement join the two queries using the union operator.
Such as,
SELECT "Product"."Type" saw_0, "Base Facts"."Revenue" saw_1 FROM "Sample Sales" union SELECT "Sample Sales"."Product"."Brand" s_1, "Sample Sales"."Base Facts"."Revenue" s_2 FROM "Sample Sales" ORDER BY saw_0


  •        Then click ok. You will see that Brand and type is joined into one column.
       

 Combine results based on union, intersection and difference operators
  •       The other way to join multiple values is using the option in the selected column pane.
  •        Click on the + sigh in the far right hand side.
  •        Now, In the Result Column, You will see two criteria’s
  •        In the first criteria Drag Product – Brand and Base Facts – Revenue
  •        In the second Criteria Drag Product – Type and Base Facts- Revenue
   

  •              Similarly as above you will get the same results.
       





No comments:

Post a Comment