Monday 30 July 2012

OBIEE 11g6: Hierarchical Roll-Up and Individual Total of Facts -- Part 2

  1. Now we are onto creating the "SalesIndiv" Business Model.
  2. In the "Physical" layer pane create the 4 aliases as we did previously but this time name them "D51 Sales Rep" , "D52 Sales Rep Parent Child" , "D53 Sales Rep Position" and "F51 Revenue" accordingly.



  3. Select all the newly created 4 alias tables and right click and choose "Physical Diagram" -> "Object(s) and All Joins"



  4. Create the following Join with "EMPLOYEE_KEY" and "EMPL_KEY" as shown in below screenshot.
  5. Click "OK" to close the window.



  6. Create the following join by selecting the "POSTN_KEY" and "POSTN_KEY" as shown in below screenshot.
  7. Click "OK" button to close the window.



  8. Finally you should end up with the following joins as shown in below screenshot.
  9. Close the "Physical Diagram" window by clicking the "X" button.



  10. Now create a new model "SalesIndiv" in the "Business Model and Mapping" Pane.
  11. Drag the 2 tables "D51 Sales Rep" and "F51 Revenue" to the "SalesIndiv" Business model.
  12. Select both the tables and Right click, select "Business Model Diagram" -> "Whole Diagram" .



  13. Make sure that the link is shown as in below screenshot.



  14. Double click on the "LTS1 Sales Rep" and Click on the "+" icon.
  15. In the Browse window select both the tables and click the "Select" button as shown in below screenshot.



  16. Make sure that the two joins have been created as shown in below screenshot.



  17. Select the "D51 Sales Rep" and right click and select the "Create Logical Dimension" -> "Dimension with Parent-Child Hierarchy"



  18. Make sure that "D51 Sales Rep_Key" and "Mgr id" are selected for the "Member Key:" and "Parent column:" values respectively as shown in below screenshot.



  19. Click on the "Parent-Child Settings..." button.
  20. Click on the "Select Parent-Child Relationship Table" icon.
  21. In the new window that comes up select the "D52 Sales Rep Parent Child" table and click the "Select" button.



  22. Click "OK" on the "Logical Dimension - D51 Sales RepDim" window to close it.
  23. Select the appropriate "MEMBER_KEY", "ANCESTOR_KEY" , "DISTANCE" and "IS_LEAF" values as shown in below screenshot.



  24. Right click on the "Sales Rep Name" and select the "New Logical Level Key..." as shown in below screenshot.



  25. Make sure that the values correspond to that shown in the below screenshot:
  26. Click "OK" button to close the window.



  27. Click on the "Detail" Level folder and confirm below values are shown as in below screenshot.
  28. Click "OK" button to close the window.



  29. Drag the "SalesIndiv" Business Model from the "Business Model and Mapping" pane to the "Presentation" pane and validate everything is ok as shown in below screenshot.
  30. Select the "File" -> "Check Global Consistency" option on the main menu and fix any errors shown then save your repository.



  31. We are now going to implement our hierarchical and individual roll-up reports.
  32. Open up the web browser and enter the URL: http://localhost:9704/analytics
  33. On the OBIEE Menu select New->Analysis->Select Subject Area->SalesRoot.
  34. Select the two columns as shown in below screenshot:



  35. For the 2nd column, select Options and "Edit Formula".
  36. In the "Column Formula" field enter the below formula as seen in the screenshot:



  37. Now goto the "Results" tab and we can observe that all the totals are added up at the top most Sales Rep: Michele Lombardo.



  38. No we create for the individual roll-up totals.
  39. On the OBIEE Menu select New->Analysis->Select Subject Area->SalesIndiv.
  40. Select the 2 columns as shown in the below screenshot:



  41. Select the 2nd column options "Edit formula" and enter the below formula as shown in below screenshot:



  42. Now click the "Results" tab to see the output.
  43. Here we can see that the Individual Roll-Up of totals where the Sales Rep: Michele Lombardo total Revenue made is $110,000.00 dollars where as compared to the
  44. previous Total Hierarchical Roll-Up was : 50,000,000.00 which was the totals of his and his sub-ordinates totals.



  45. There is one more thing that is observed above in the report is that the Sales Rep: Sophie Bergman and her sub-ordinates are not listed here since "Sophie Bergman" has no rows which contributes to the Revenue, as can seen in the below screenshot:



  46. In order to list these "No Rows" Sales Reps i.e. Sophie Bergman and her sub-ordinates we would have to go with an alternate procedure that includes the "UNION" reports.
  47. Open your web browser to the URL: http://localhost:9704/analytics and login as admin user "weblogic"
  48. Select the  New->Analysis->Select Subject Area->SalesIndiv.
  49. Select the 2 columns "Sales Rep Name" and "Revenue".
  50. Select the 2nd column options "Edit formula" and enter SUM("F51 Revenue"."Revenue") formula and click the "OK" button.
  51. Next select the "Combine results based on union, intersection, and difference operations" icon i.e green "+" icon.
  52. Under the "Select Subject Area" section select "SalesIndiv" as shown in the below screenshot.



  53. Drag the "Sales Rep Name" to the "Add Column(Sales Rep Name)" section.
  54. Drag the "Sales Rep Number" to the "Add Column(SUM(Revenue))" section.
  55. On the 2nd "Sales Rep Number" column select options "Edit formula" and enter ' ' i.e two single quotes with a space in between and click "OK" button.



  56. Your final Union Report should look as shown in the below screenshot.



  57. Click on the "Result" tab to display the report as shown in the below screen:
  58. You can notice that Sales Rep: Sophie Bergman and her sub-ordinates are now seen but we have lost the Hierarchical structure that exists above.




Note:
In order to get the "SalesIndiv" subject area to work with the hierarchical layout and the Individual Roll-Up criteria, one way is to get those members with out any rows or table entries to be updated with entries for atleast one row with a value of "0" for revenue field.
With this we would not require the UNION report workaround.

Summary:
As can be seen we have ran through a lot of steps to create our Business Models for both the hierarchical and Individual roll-up scenarios.
After demonstrating the lack of support to the 0-rows members to show up in the hierarchical order, we have created one work around to view those members.
Maybe there is a way for us to come up a Hierarchy for the Individual roll-up and I will be happy if some one can post a comment and point me in that direction.

1 comment:

  1. Loan Opportunity Offered By Mr, Benjamin That Save My Family From Financial Bondage {lfdsloans@lemeridianfds.com}

    Hello Everyone, I am Putri Adiratnaa single mom from Jakarta, I would like to share this great testimony on how I got a loan from Mr, Benjamin, when we were driven out of our home when I couldn't pay my bills anymore, After being scammed by various companies online and denied a loan from my bank and some other credit union I visited. My children were taken by the foster care, I was all alone in the street. The day i shamefully walked into an old school mate who introduced me to Daisy Maureen. At first I told her that I am not ready to take any risk of requesting a loan online anymore, but she assured me that I will receive my loan from them. On a second thought, due to my homelessness I had to take a trial and applied for the loan, luckily for me I received a loan of $80,000.00 from Mr, Benjamin. I'm happy I took the risk and applied for the loan. My kids have been given back to me and now I own a home and a business of my own. All thanks and gratitude goes to Le_Meridian Funding Service and for the help of Mr, Benjamin for giving me a meaning to life when i had lost all hope. If you currently seeking for a loan assistance, you can contact them via: {lfdsloans@lemeridianfds.com} Or WhatsApp +1-989-394-3740

    ReplyDelete