Professional Documents
Culture Documents
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 .
Step3: Click on Interaction tab and select Action Links as shown in below screenshot.
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
1 Votes
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 :
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: Give name for the Parent Child hierarchy table and Click Next .
Step8: You can see both DDL and Script to populate data here .
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