Wednesday, November 20, 2013

Groups vs Calculated Items in OBIEE 11g

Blog Index

OBIEE 11g features a new ability to create custom groupings of attribute column members, and there are two separate mechanisms that may be used: Groups and Calculated Items.  What is the difference between them?

   1.        Create this new analysis from the Sample Sales subject area.  The filter returns all values of P1 Product that contain the letter 'p'.


   2.        Modify the Table view to add a row of grand totals.  Notice that the formula for 20 Actual Unit Price is correctly recalculated on the grand total row at 8.926 per unit of quanitity sold.


Now we'll create the first new object, a Custom Group called Group P.

   3.        On the Results tab, click the New Group icon on the toolbar.


   4.        Use the same logic as shown above to select the same 5 values of P1 Product and click OK.


   5.        Notice that a new row labelled Group P has been added to the analysis, and the values on that row are correct.


Now let's create a Calculated Item

   6.        Click the New Calculated Item icon on the toolbar.


   7.        Use the same logic to make the same 5 values of P1 Product available in the left window.


   8.        One at a time, highlight a value in the left window, and shuttle it to the right window using the icon.  After shuttling a value, follow it with a + sign (except for the last one) so that the final formula looks like this:


   9.        Click OK to close the Calculated Item dialog.

10.        The results now show a new row for Item P, but not all of its values are correct.


So there we see the difference between Groups and Calculated Items.  Custom Groups respect and reevaluate the formulas for calculated columns such as Actual Unit Price.  In other words, the aggregation methods for the columns are retained.  But Calculated Items perform the exact calculation entered on the New Calculation Item screen, no matter what fact column is involved.  In this case, if you add the 5 values of Actual Unit Price, the total is 45.952.

Which begs the next question: Under what circumstances would you ever want to use a Calculated Item instead of a Custom Group?  I'm not able to think of a reason.

Each of these new objects may be saved for future use with other analyses.

11.        On the Results tab, expand the Selection Steps panel at the bottom of the screen.

12.        Click on the Group P link then select Save Group As.


13.        Save the group as Group P in the proper subject area folder.  Group P is now available for reuse in the Selection Steps panel for any other analysis.

14.        The same process applies for Item P as well.

Wednesday, October 30, 2013

Creating Simple Dashboard Buttons

Blog Index

 

In versions of OBIEE prior to 11g, the Reset button associated with a dashboard prompt could only roll back to the most recently applied value, not the original default.  We used the method described below to add a true Reset button to the dashboard.  This button reset all prompts back to their default values. 

 

That same method could also be used to create a button to launch almost any website.  An example of that is shown below as well.

 

Dashboard Prompt Reset Button

 

   1.        Add a Text object to the dashboard page.

 

   2.        Add this code for the Text object.

 

<div class="XUIPromptEntry minibuttonOn"><a href="#" onclick="return PersonalizationEditor.removeDefaultSelection(false ) ">Reset Prompts</a></div>

 

   3.        Click the Contains HTML Markup checkbox.

 

   4.        Click OK to save the Text object.

 

   5.        Add a dashboard prompt to the page.

 

   6.        Save and run the dashboard page, make a prompt selection click Apply.

 

   7.        Click the Reset Prompts button to test the reset functionality.

 

Website Launch Button

 

We can use the same technique to navigate to a website (in this example, Oracle.com).

 

   1.        Add another Text object to the dashboard page.

 

   2.        Add and save this code (don't forget the HTML Markup checkbox).

 

<div class="XUIPromptEntry minibuttonOn"><a href="http://www.oracle.com/" target="_blank" >Oracle</a></div>

 

Note: The target="_blank" tag opens the content in a new browser window or tab.

 

   3.        Run the dashboard page and test the button.

Friday, October 25, 2013

OBIEEWanderings Blog Index

Copy Sections between Dashboard Pages



Blog Index

Have you ever wanted to copy or move a section from one dashboard page to another, or even move a section or column into a different dashboard? The information below will show you how.
   1.        Open Catalog Manager.
   2.        Attach in Offline Mode to the catalog containing the dashboard that contains the section or column that is to be moved or copied. 
   3.        Drill down to find the dashboard containing the source object.  Note that dashboards are stored under the _portal folder.  In this example, my dashboard is called Class Links, stored in the Training folder.
   4.        The section that I want to move is currently located on the OBI291 page of the Class Links dashboard.  Double-click the OBI291 page icon on the right side of the screen.
   5.        On the Properties dialog that appears, click the Edit XML button near the top right.
   6.        Now you need to find the XML for the section that you want to copy.  The XML tag that begins a section is <sawd:dashboardSection>.  Scroll through the XML until you find that tag at the beginning of the section you want to copy. 
(The similar tag for an entire column is <sawd:dashboardColumn>.)
   7.        Highlight everything starting with <sawd:dashboardSection> and ending with the subsequent </sawd:dashboardSection> ending tag.  (If you want to move two or more adjacent sections, just highlight more XML, but be sure to end with one of the </sawd:dashboardSection> tags.
Helpful hint: I find it easier to just copy/paste the entire XML into Notepad then highlight what I want.
   8.        Copy the highlighted XML to the Windows clipboard (right-click + copy, or ctrl-c).
   9.        Click Cancel twice to close the dialog boxes.
10.        Double-click the receiving dashboard page.  It may be a page in any dashboard.
11.        Click the Edit XML button.
12.        Click the Edit button below the XML.  This will allow you to edit the XML for the dashboard page.
13.        Find an existing occurrence of a section ending tag (or, if you are copying a column, find a column ending tag).  A section ending tag is </sawd:dashboardSection>.
14.        Immediately following the existing section ending tag, hit the Enter key to insert a blank row.
15.        On the blank row, right-click + Paste to paste the XML that you copied to the clipboard earlier.
16.        One last thing: Look at the top of the XML you just pasted.  It will start with something like this:
<sawd:dashboardSection name="Section 9"
If two sections on the same page have the same name, both sections will appear in the dashboard, but they will share the same set of editing icons in the dashboard editor, which is probably not a good thing.  Change this name= parameter to some other number that isn't used on this dashboard page.
17.        Click OK twice to close the dialogs.  The process is complete.
18.        Access your modifed dashboard page to see the copied section.

Wednesday, April 3, 2013

Over a period of several years, I've developed a list of things that I consider to be shortcomings in OBIEE. Some are bugs. Others are what I consider to be odd design decisions. If you would like to see the things that I have suggested to Oracle, download this PDF document. Enhancement Requests

Monday, August 15, 2011

Creating XML data from a relational table

Blog Index

 

I'm adding a lesson to my classes for "Using XML as a Physical Data Source", and wanted to create an XML file from an existing relational table.  The Oracle documentation shows us several different methods.  Here is a script that worked for me.  Save the following commands as a script and run in SQL*Plus.

--Suppress output to the command window

set termout off;

--Suppress the # of rows returned message

set feedback off;
--Suppress the display of the column heading row

set heading off;

--Suppress paging

set pagesize 0;

--Set maximum line width for CLOB datatype (the result of the XMLForest function)

set long 200;

--Set default line width to 200

set linesize 200;

--Set RESULTS column to 200 characters wide

column results format a200;

--Open output file

spool c:\ClassAgg.xml;

select '<Table Name="ClassAgg.xml">' from dual;

select xmlelement("ROW", XMLForest(channel, region, division, month, cost, sales, units)) as results

 from agg_reg_div_mv;

--Close output file

spool off;

--Reenable output to the command window

set termout on;

 

It's a bit wordy, of course, because all of those SET commands could be combined.  But the important part of the syntax is the use of the select xmlelement ... xmlforest command.

 

The columns in the agg_reg_div_mv table are channel, region, and so forth.  I've chosen to use the actual column names as the XML tags, but you could use alias names just as you would in an ordinary select statement.  For example:

 

xmlforest(channel "chan", region "reg"....)

The first three rows of output look like this:

<Table Name="ClassAgg.xml">

<ROW><CHANNEL>Web</CHANNEL><REGION>East</REGION><DIVISION>Mens Apparel</DIVISION><MONTH>Aug-2008</MONTH><COST>36072.32</COST><SALES>43218.35</SALES><UNITS>2858</UNITS></ROW>

<ROW><CHANNEL>Retail</CHANNEL><REGION>West</REGION><DIVISION>Childrens Apparel</DIVISION><MONTH>Aug-2008</MONTH><COST>39950.54</COST><SALES>50192.62</SALES><UNITS>252</UNITS></ROW>

 

Sunday, July 17, 2011

Greetings!

Hello, everyone.  Welcome to OBIEE Wanderings, my blog for anything and everything related to Oracle Business Intelligence Enterprise Edition.  My name is Mark Thompson, lead OBIEE Trainer for Maverick Solutions.  My students have frequently suggested "you ought to write a blog", so here goes my first effort.  I'll be posting suggestions, techniques, and even my gripes about the product.  It probably won't be an every day event, but I hope what I post will be useful to you.  Best wishes to everyone, and I'll be posting my first blog entry shortly.