Beruflich Dokumente
Kultur Dokumente
Carpediemconsultings Blog
carpediemconsulting.wordpress.com/category/obiee/
1/11
1/29/13
There was a question asked on this post here (http://carpediemconsulting.wordpress.com/2008/11/25/choose-and-indexcol-functions-in-obiee/) and I thought of having another post to answers Viks question. Hi carpediemconsulting Good Artical, Thanks We have a Similar req at my client, but little bit different. we have a Dimension, in that we have a hierarchy H1 with Levels, Level1, Level 2 , Level 3 we are implimenting this product for different companies, Lets say comp A, & Comp B, In Comp A we call level 1 as Market and in comp B we call it as Location can we change these Level1 label dynamically when the user login. FYI . these labels are stored in TABLE Thanks Vik As you can see from the properties of a presentation column you could see that there is a provision to specify a custom display name. I have two users created in the RPD. USER1 and USER2. My objective is to give a custom display name for a Column (Brand column in the Product Table). User1 would like the display to be USER1 BRAND and user2 USER2 BRAND. I have created a session variable (BRAND_DISP_NAME) which would be initialized to USER1 BRAND for user1 and USER2 BRAND. In the properties window for the presentation column brand do the following. Uncheck use logical table Name check box Check the Custom Display Name check box Type in the name of the session variable in the text box. In my case VALUEOF(NQ_SESSION.BRAND_DISP_NAME) Here is a screenshot.
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0021.jpg) Now lets see how the column shows up for these 2 users in Answers. USER 1
carpediemconsulting.wordpress.com/category/obiee/ 2/11
1/29/13
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0041.jpg)
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0061.jpg) As shown in the screenshots above the display name for the column brand is different for these two users. Hope this answers Viks question. Filed under: BI, OBIEE | Tagged: OBIEE | Leave a Comment
carpediemconsulting.wordpress.com/category/obiee/
1/29/13
1 2 3 4 3 4 5 6 7
User1 has access to cost centers 1-4 in the P&L hierarchy and 3-7 in the Management Hierarchy. Here are the 2 hierarchy tables for this example. Hierarchy P&L P&L P&L P&L P&L P&L P&L Hierarchy MGMT MGMT MGMT MGMT MGMT Cost_center 1 2 3 4 5 6 7 Cost_center 1 2 3 4 5 Level2 P&L LVL2 1 P&L LVL2 1 P&L LVL2 1 P&L LVL2 1 P&L LVL2 2 P&L LVL2 2 P&L LVL2 2 Level2 MGMT LVL2 1 MGMT LVL2 1 MGMT LVL2 1 MGMT LVL2 2 MGMT LVL2 2 Level1 P&L LVL1 1 P&L LVL1 1 P&L LVL1 1 P&L LVL1 1 P&L LVL1 1 P&L LVL1 1 P&L LVL1 1 Level1 MGMT LVL1 1 MGMT LVL1 1 MGMT LVL1 1 MGMT LVL1 1 MGMT LVL1 1
4/11
carpediemconsulting.wordpress.com/category/obiee/
1/29/13
MGMT MGMT
6 7
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0022.jpg) Now lets see how this is modeled in the RPD. Physical Layer Joins I have aliased the security profile table as Sec Profile PL and Sec Profile Mgmt
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0042.jpg) There is a similar join between the Sec Profile Mgmt table with the Management Hierarchy table. Here is how the BMM layer is done. The cost center table will have 2 logical sources and each of these logical sources would have an inner join to the appropriate sec profile alias table.
carpediemconsulting.wordpress.com/category/obiee/
5/11
1/29/13
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0062.jpg)
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0081.jpg) All the columns are mapped to both the logical sources. Now we need to define appropriate fragmentation content for these 2 logical sources. Here is the Mgmt source
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image0101.jpg) Add the user_id column to the logical table and map it to the appropriate logical sources. Now all thats left is to go to the relevant group in the RPD and add the security filter.
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image012.jpg) Create reports with the hierarchy as one of the columns and set filter to a presentation variable
carpediemconsulting.wordpress.com/category/obiee/
6/11
1/29/13
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image014.jpg) Also create a prompt and set a presentation variable in the prompt. (http://carpediemconsulting.files.wordpress.com/2009/11/clip_image016.jpg) Throw the 2 in a dashboard and lets see how the reports work for USER1
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image018.jpg)
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image020.jpg) Its very important to have the filter on the hierarchy column in every query otherwise you would end up overstating the numbers. Filed under: BI, Data Warehousing, OBIEE | 2 Comments
1/29/13
joins. But in our case the users were not able to define the joins in advance and there is a possibility of the view definitions changing over a period of time. To sum it up the users wanted to simulate a SQL tool with answers, sort of.
(http://carpediemconsulting.files.wordpress.com/2010/01/clip_image002.jpg) In our case View 1 and View 2 could be joined up to 4 different ways and there were quite a few views like that, making the whole aliasing approach cumbersome. One of the developers in the team came up with an idea, though its not the perfect solution, but definitely simple and worth mentioning. First up we extended all the views in the database by adding a dummy column and the values were always 1. View 1 Col1 Col2 Col3 Col4 Dummy 1 1 View2 Col1 Col2 Col3 Col4 Dummy 1 1 The physical layer in the RPD would have the join between the views as View1.dummy = View2.Dummy. There is nothing special about the BMM layer, the usual and the same with the presentations layer. Now comes the answers part. If I were to run a query between the 2 views without any filters in the query the results would not make any since the join is View1.dummy = View2.Dummy. Lets say for query 1 I want to join on View1.col1 = View2.col1. Here are the steps. Put a filter on View1.Col1. (View1.Col1 = value1) Convert that filter to SQL Equate View1.Col1 to View2.Col2 in the filter SQL.
carpediemconsulting.wordpress.com/category/obiee/ 8/11
1/29/13
(http://carpediemconsulting.files.wordpress.com/2010/01/clip_image004.jpg) This will have your physical queries appended by 2 join conditions 1) which is defined in the RPD(View1.dummy = View2.Dummy) and 2) View1.col1 = View2.col1 . You could define any joins in a similar fashion. One serious limitation is that the joins are always inner joins. Filed under: BI, Data Warehousing, OBIEE | 2 Comments
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image002.jpg) And the picture below shows what the client wanted.
carpediemconsulting.wordpress.com/category/obiee/
9/11
1/29/13
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image004.jpg) We could have done the same with a complex case expression but we found an alternative which is more elegant and better performing, using pivot table calculations. First up we need to change the formula for the quarter to the one shown below.
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image006.jpg) Current year is a repository variable, this could also have been a presentation variable. And the table view would look like
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image008.jpg) Now create a pivot table for this with the year on the left and the quarter on the top. Create 2 calculated items on the year column The first one (Actuals) as $2 and the second one as $2-$1 (growth) and then hide the details and this would give the sales amt for all the quarters for the current year and the growth.
carpediemconsulting.wordpress.com/category/obiee/
10/11
1/29/13
(http://carpediemconsulting.files.wordpress.com/2009/11/clip_image010.jpg) Filed under: BI, OBIEE | Tagged: OBIEE, Pivot Table, Time series | Leave a Comment Next Page Blog at WordPress.com. Theme: Digg 3 Column by WP Designer.
carpediemconsulting.wordpress.com/category/obiee/
11/11