You are on page 1of 17

Conditional Navigation in OBIEE 11G

I have a report from which, I need to navigate to two different reports based upon the rows in a column. For Example: For the Year 2010 I have to give one Navigation detail report and for the year 2012 I have to give navigation to other detail report etc.. Lets follow the steps (Simple Example) : Step1: Create a report .

Step2: For the year column go to column properties .

Step3: Click on Interaction tab and select Action Links as shown in below screenshot.

Step4:Select Navigate to BI Content

Step5: Select detail obiee report and click OK

Step6: Click on conditionally Radio Button and select Per Name Year.

Step7: Select year = 2010(Here if the Year = 2010 then , you can navigate to the particular detail report)

Click OK . Step8: Click on results and you should be able to see the hyper link on only the year 2010 .

Do the same for all the years and give different detail reports . Hope this blog entry is helpful -By Prasad Madhasi. pivot view conditional formatting in OBIEE based on other columns...
Hi world, conditional formatting, in pivot, based on other columns is a stumbling block to many developers in OBIEE world. following is a workaround: If you want to paint the background color of products/customers/segment/region column that have sales more than $$$$ amount....apply similar code to column formula (the column which should be colored):

tip: using a span tag only paints the background color of the content, to paint the cell use div tag instead of span. span is inline element, while div is block level element. after applying the above code, change the data type of the column to as shown in the following screen shot:

...if you feel that there are lot many values to build using a case statement, use bins to build a case statement first and add the tags.... hope this helps thanks -nag

Pivot table Conditional Coloring and Tooltips


Posted by Debashis Paul * A Passionate Blogger * under Look and Feel, OBIEE, Presentation Service | Tags: conditional format color obiee, obiee tooltips, pivot table coloring obiee, server complex aggregate obiee | 1 Comment

1 Votes

Oracle BI EE 10.1.3.3/2 Conditional Formatting based on Multiple Columns


Posted by Venkatakrishnan J on March 12, 2008 Another simple question came today to me via email today. Though everyone would know about this, i thought i would blog about it to keep this as a future reference. As soon as 11g comes out(not sure when though), i shall be blogging about how the same can be done in 11g. The question is I have a very simple report containing Region, Dollars Year Ago, Forecast and Dollars as shown below. I need to highlight all the Regions in Red for which Forecast is greater than Dollars Year Ago but is less than the actual sale( Dollars). i.e in the report shown below we would have to highlight all the regions except the WESTERN REGION.

In order to achieve this we will be following a very simple technique. The first step is to create a new column containing the below formula. CASE WHEN Measures.Dollars > Measures.Forecasted Dollars AND Measures.Forecasted Dollars > Measures.Year Ago Dollars THEN 1 ELSE 0 END

Now, hide this column and go to the properties of the Region Column and add a conditional Format, something like If the new column created above is 1 then Red Color.

Now, you would have all the Regions for which Forecast is lesser than Sales but greater than year Ago sales, to be highlighted in Red.
Once I was working for a giant UK based client where we had a requirement to replace the existing .Net system . As everybody know that OBIEE is not a programming language rather a tool and there must have certain limitations as this could not be customized like a language .This is pretty hard to make a realization to them as they mostly focus on business needs rather thinking from technical perspective . Which is true indeed ! So sometime we say this is not possible very upfront and outright and sometime we need to further dig down on any alternative solution or workarounds . Sometime it is successful and sometime not . So this is all about the background of this thread and how myself succeed to help there business achievement . The requirement was something like there would be multiple measure which need to be displayed against dimensions in pivot table . Measure 1 is a target achievement measure which need to be shown either Green or Red status based on target value set (target value is not hard-coded and its dynamic and driven by a backend threshold value ). For other measures at the end month there might be some order which is confirmed , some unconfirmed and some yet to be build . Now once user hover mouse to the colored cell (of those status represented in Legend) it should show the information in tooltips .A valid information in this scenario could be specifying the dynamically changed date time window and mention the type of the period i.e building , confirmed or unconfirmed . Lets have a look on the pivot report :

Nice huh ?? I have actually googling around to get a readymade solution and unfortunately it doesnt help . Finally after building this I even get surprised about nothing is technically impossible ! Nows lets see the how the measure and its status entirely driven dynamically in RPD .Only change done in webcat is treating the data format as HTML .

However you can put same calculation in Catalog itself in column formula to achieve this . But for this let BI server understand that you want Server Complex Aggregate to represent the conditional column measure .

The commentary is another interesting stuff where based on status of each month order Admin user want to add/update there comments which navigated to a target where Writeback has been implemented . Commentary code is like below :

Hierarchies Parent Child Hierarchy in OBIEE 11G


Step-By-Step Example to implement Parent-Child Hierarchy : There are different types of hierarchy which exists in an Organization data which gives more insight for our analysis. Ragged Hierarchy : A hierarchy in which all the lowest-level members do not have the same depth. For example, a Time hierarchy might have data for the current month at the day level, the previous months data at the month level, and the previous 5 years data at the quarter level. This type of hierarchy is also known as an unbalanced hierarchy. Skip-level Hierarchy : A hierarchy in which certain members do not have values for certain higher levels. For example, in the United States, the city of Washington in the District of Columbia does not belong to a state. The expectation is that users can still navigate from the country level (United States) to Washington and below without the need for a state. Parent-Child Hierarchy : Consists of values that define the hierarchy in a parent-child relationship and does not contain named levels. For example, an Employee hierarchy might have no levels, but instead have names of employees who are managed by other employees. A parent-child hierarchy is a hierarchy of members that all have the same type. This contrasts with level-based hierarchies, where members of the same type occur only at a single level of the hierarchy. The most common real-life occurrence of a parent-child hierarchy is an organizational reporting hierarchy chart, where the following all apply: Each individual in the organization is an employee. Each employee, apart from the top-level managers, reports to a single manager. The reporting hierarchy has many levels. In relational tables, the relationships between different members in a parent-child hierarchy are implicitly defined by the identifier key values in the associated base table. However, for each Oracle BI Server parent-child hierarchy defined on a relational table, you must also explicitly define the inter-member relationships in a separate parent-child relationship table.

Let us start with Parent-Child Hierarchy and see how to implement it . Am taking Employee table to work around . Click here to download .sql file for Employee table DDL and Data . Step1 : Create a blank repository and import the Employee table in to Physical Layer .

Step2: Create Alias on EMPLOYEE table 1.EmployeeDim and 2.SalaryFact and give physical join between EmployeeDim to SalaryFact .

Step3: Drag the tables in to BMM layer and give aggregations for the fact columns.

Step4: Now right click on Employees logical table and choose for new parent child hierarchy .

Step5: Choose the member key (by default it will take the primary key . Here Employee Number) and parent column as shown in the below screenshot.

Step6: Click on parent- child settings .This is the place where we are going to generate the DDL & DML scripts which we can use to create and populate the hierarchy table which will be

used by BI server to report parent child hierarchies. Here click on Create Parent-Child Relationship Table .

Step7: Enter the DDL&DML script names and click Next .

Step7: Give name for the Parent Child hierarchy table and Click Next .

Step8: You can see both DDL and Script to populate data here .

Click Finish . You can see the screen as follows .

Click Ok again Ok . After finishing the wizard you can see the HierarchyTable got imported automatically.

Right click on the EMPLOYEE_HIERARCHY table > click on update rowcount and observe that you will get Table does not exist error Step9:Go to the path <beahome>\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\ repository. Run the scripts EMPLOYEE_PARENT_CHILD_DDL.sql and

EMPLOYEE_PARENT_CHILD_DATA.sql .(My case I used SQL Developer to Run this scripts) DDL : CREATE TABLE EMPLOYEE_HIERARCHY ( MEMBER_KEY DOUBLE PRECISION, ANCESTOR_KEY DOUBLE PRECISION, DISTANCE NUMBER(10,0), IS_LEAF NUMBER(10,0) ); Script For polulate Data : declare v_max_depth integer; v_stmt varchar2(32000); i integer; begin select max(level) into v_max_depth from EMPLOYEE connect by prior EMP_NO=MANAGER_ID start with MANAGER_ID is null; v_stmt := insert into LINEAGE.EMPLOYEE_HIERARCHY (MEMBER_KEY, ANCESTOR_KEY, DISTANCE, IS_LEAF) || chr(10) || select EMP_NO as member_key, null, null, 0 from EMPLOYEE where MANAGER_ID is null || chr(10) || union all || chr(10) || select || chr(10) || member_key, || chr(10) || replace(replace(ancestor_key, \p, |), \, \) as ancestor_key, || chr(10) || case when depth is null then 0 || chr(10) || else max(depth) over (partition by member_key) depth + 1 || chr(10)

|| end as distance, || chr(10) || is_leaf || chr(10) || from || chr(10) || ( || chr(10) || select || chr(10) || member_key, || chr(10) || depth, || chr(10) || case || chr(10) || when depth is null then || member_key || chr(10) || when instr(hier_path, |, 1, depth + 1) = 0 then null || chr(10) || else substr(hier_path, instr(hier_path, |, 1, depth) + 1, instr(hier_path, |, 1, depth + 1) instr(hier_path, |, 1, depth) 1) || chr(10) || end ancestor_key, || chr(10) || is_leaf || chr(10) || from || chr(10) || ( || chr(10) || select EMP_NO as member_key, MANAGER_ID as ancestor_key, sys_connect_by_path(replace(replace(EMP_NO, \, \), |, \p), |) as hier_path, || chr(10) || case when EMP_NO in (select MANAGER_ID from EMPLOYEE ) then 0 else 1 end as IS_LEAF || chr(10) || from EMPLOYEE || chr(10) || connect by prior EMP_NO = MANAGER_ID || chr(10) || start with MANAGER_ID is null || chr(10) || ), || chr(10) || ( || chr(10)

|| select null as depth from dual || chr(10); for i in 1..v_max_depth 1 loop v_stmt := v_stmt || union all select || i || from dual || chr(10); end loop; v_stmt := v_stmt || ) || chr(10) || ) || chr(10) || where ancestor_key is not null || chr(10); execute immediate v_stmt; end; / Click on COMMIT to commit changes .

Right click on the EMPLOYEE_HIERARCHY table > click on update rowcount and observe that you will not get Table does not exist error . Step10: Pull the ParentChildHierarchy into Presentation Layer ,Check Consistency and save the repository .Now we are ready to Build reports .

Click Here to download Repository (Repository Password : Admin123) Step11: Go to answers create analysis including Employee Hierarchy . Thats it -By Prasad Madhasi

You might also like