Search

Custom Search

Saturday, June 6, 2009

Linking Dimensions across different data providers.


Some times you need to define more than one data provider in your report. A common example if you trying to build master detail report having actual data divided between 2 data base table. In this case you have to create 2 separate data providers. While you creating the second one, a pop up wizard will prompting you to link the common dimension between 2 data source. If there are common dimensions between the 2 data sources and with same of type, name and same list of values them the linking will done automatically without the need to prompt the user for action.
If you creating a report that reads data from one database data source and the other reads from an excel file, and there is a common dimension that you need to link with. Just open
Data --> View Data --> definition tab then select your dimension from the left pan.
You will notice the link button at the bottom of the page.
When you click on the link button a window with 2 pans will displayed. You can select the dimension that you want to link with from the right pan while you can select the dimension that you want to link to from the left pan. Click the link button in the middle area.
If you want to unlink 2 dimensions then Go to Data --> View Data --> Definition tab then select your dimension from the left pan and click unlink button.
Example # 1:
Universe # 1 (Current Account Universe)
ClassObject NameDimension / MeasureType
Customer SegmentSegment CodeDimensionNumber
Segment DescriptionDimensionChar
Customer Sub SegmentSub Segment CodeDimensionNumber
Sub Segment DescriptionDimensionChar
ProgramProgram CodeDimensionNumber
Program DescriptionDimensionChar
Regional InformationRegionDimensionChar
AreaDimensionChar
BranchDimensionChar
TimeAs of DateDimensionDate
WeekDimensionnumber
MonthDimensionchar
QuarterDimensionchar
YearDimensionnumber
MeasuresBalanceMeasurenumber
profitMeasureNumber
Universe # 1 (Current Account Universe)
ClassObject NameDimension / MeasureType
Customer SegmentSegment CodeDimensionNumber
Segment DescriptionDimensionChar
Customer Sub SegmentSub Segment CodeDimensionNumber
Sub Segment DescriptionDimensionChar
ProgramProgram CodeDimensionNumber
Program DescriptionDimensionChar
Regional InformationRegionDimensionChar
AreaDimensionChar
BranchDimensionChar
TimeAs of DateDimensionDate
WeekDimensionnumber
MonthDimensionchar
QuarterDimensionchar
YearDimensionnumber
MeasuresCredit card balanceMeasurenumber
Credit card profitMeasureNumber

 

Report # 1
Current Account
Credit Card
Segment
BalanceProfitBalanceProfit
High Affluent
Mass
Lower Mass


 

In this example we want to retrieve current account data from current account universe and to retrieve credit card data from credit card universe. Some one may ask why we don't keep both tables in the same universe and make just one query to retrieve date. This may happen because we want to make separate universes for separate products.
Create first data provider:
  • Universe: Current account

  • Dimensions: Year
  • Measures: Balance and profits.
  • Filter: year = 2009
Create second data provider:
  • Universe: Credit Cards
  • Dimensions: Year
  • Measures: Credit Cards Balance and Credit Cards profits.
  • Filter: Year = 2009
In this report the linking will done automatically because the year dimension have the same name, type and list of values across the 2 universes.
What if the segment dimension having different name in credit card universe? Customer group for example. In this case when you create the second data provider the linking window will displayed to prompt the user to select the linking dimension.
Example # 2:
Now if you have an excel file with loans data and you want to include loans information in your report.
Excel file Data
SegmentBalanceprofit
High Affluent
Mass
Lower Mass

 

You will need to do as follow:
  • Open your report.
  • Create a new data provider based on another data source.
  • Select excel file.
  • Complete the wizard.
  • Go to Data --> View Data --> Definition tab then select your dimension from the left pan and click link button.
  • Link segment dimension form loans data provider with segment dimension from current account data provider.

Wednesday, June 3, 2009

Manage Security with business objects designer.

If you are a universe designer, you will need to specify access levels for groups and users for your universe.

To manage user and group access to your universe do as follow:

  • Tools à Manage Security à Manage Access restrictions
  • The window divided into 2 pans
    • The left pan displays available restrictions
    • The right ban display users and group.

Restrictions:

  • Object level: you can restrict user or group from access a specific object.
  • Row level: you can restrict user or group from access specific rows from specific table based on criteria.
  • Table mapping: display data from another table for user or group.
  • General restriction: connection, control, SQL

Example:

We want to create the following restrictions:

  • Restrict user / group from accessing profit object. (object level)
  • Restrict user / group to display VIP customer's data based on VIP flag column. (row level)
  • Display data for retail users / groups from retail data table instead of displaying it from the corporate table. (table mapping)
  • Limit number of rows retrieved by user query (general)


 

To preview user and group access to your universe do as follow:

  • Tools à Manage Security àpreview net access restrictions.
  • Select user or group that you want to preview access for.
  • Click preview.

Notes:

  • You can create mixed restriction that mix many types of restrictions (object, row, table mapping and general)
  • If you apply the same restriction to more that one group then you can specify priority for them.

What is Scope of Analysis?

Scope of Analysis is one of the most powerful features in business objects. Now you can easily build your custom hierarchies and use them in your report to navigate through data. To make it easy I will consider a small example then go step by step starting from building the universe and end with how to use the drill feature to navigate through data.

Example:

We have one fact table that contains daily sales and number of customers against branches.

Fact Table:

As of Date

Branch CD

Number of Customer

Total Sale

30-Nov-2008

101

10

4245

30-Nov-2008

102

30

543

30-Nov-2008

103

20

6434

30-Nov-2008

104

40

6543

30-Nov-2008

105

28

3264

30-Nov-2008

106

36

657

30-Nov-2008

107

48

677

30-Nov-2008

108

48

675

31-Dec-2008

101

45

546

31-Dec-2008

102

54

765

31-Dec-2008

103

63

658

31-Dec-2008

104

23

768

31-Dec-2008

105

98

876

31-Dec-2008

106

67

786

31-Dec-2008

107

34

453

31-Dec-2008

108

21

564

31-Jan-2009

101

23

546

31-Jan-2009

102

43

545

31-Jan-2009

103

67

654

31-Jan-2009

104

32

654

31-Jan-2009

105

45

675

31-Jan-2009

106

21

765

31-Jan-2009

107

45

675

31-Jan-2009

108

67

546

28-Feb-2009

101

64

657

28-Feb-2009

102

21

865

28-Feb-2009

103

36

324

28-Feb-2009

104

73

143

28-Feb-2009

105

15

432

28-Feb-2009

106

24

324

28-Feb-2009

107

53

324

28-Feb-2009

108

21

532

31-Mar-2009

101

64

321

31-Mar-2009

102

54

432

31-Mar-2009

103

23

543

31-Mar-2009

104

25

543

31-Mar-2009

105

53

546

31-Mar-2009

106

21

564

31-Mar-2009

107

68

544

31-Mar-2009

108

54

654

30-Apr-2009

101

34

546

30-Apr-2009

102

43

654

30-Apr-2009

103

21

567

30-Apr-2009

104

54

764

30-Apr-2009

105

21

675

30-Apr-2009

106

65

765

30-Apr-2009

107

32

765

30-Apr-2009

108

11

745

31-May-2009

101

33

546

31-May-2009

102

45

547

31-May-2009

103

56

564

31-May-2009

104

78

544

31-May-2009

105

98

654

31-May-2009

106

76

546

31-May-2009

107

65

654

31-May-2009

108

54

567


 

Branch hierarchy Table:

Region

Area

Branch CD

Branch

Central

First Area Riyadh

101

Branch 101

Central

First Area Riyadh

102

Branch 102

Central

Second Area Riyadh

103

Branch 103

Central

Second Area Riyadh

104

Branch 104

West

Jeddah

105

Branch 105

West

Jeddah

106

Branch 106

West

Mekkah

107

Branch 107

West

Mekkah

108

Branch 108


 

Time hierarchy Table:

As of Date

Month

Quarter

Year

30-Nov-2008

Nov

Q4

2008

31-Dec-2008

Dec

Q4

2008

31-Jan-2009

Jan

Q1

2009

28-Feb-2009

Feb

Q1

2009

31-Mar-2009

Mar

Q1

2009

30-Apr-2009

Apr

Q2

2009

31-May-2009

May

Q2

2009


 


 

Build The Universe:

To build the universe just adds the Fact Table and the 2 hierarchy tables. Make the proper joins and create 3 main classes:


 

Tables:

  • Fact Table.
  • Branch Hierarchy table.
  • Time hierarchy table.

Classes (Universe window should be like this):

Fact Table (class)

----------------------

| -----> As of Date (Dimension)

| -----> Branch Code (Dimension)

| -----> Number of Customers (Measure) [Sum]

| -----> Total Sales (Measure) [Sum]


 

Time Hierarchy (Class)

----------------------

| -----> As of Date (Dimension)

| -----> Month (Dimension)

| -----> Quarter (Dimension)

| -----> Year (Dimension)


 

Branch Hierarchy:

-----------------------

| ----->Region (dimension)

| ----->Area (dimension)

| ----->Branch CD (dimension)

| ----->Branch (dimension)

Joins:

First Table

Second Table

Join criteria

Fact Table

Branch Hierarchy table

Branch CD = Branch CD

Fact Table

Time hierarchy table

As of Date = As of Date


 

Hierarchies:

By default in business objects it consider every dimension created as a standalone hierarchy. By for some cases as our example you want to define a custom hierarchy like time, geographical information and customer segmentation…etc. in our example we need to build 2 custom hierarchies.

Click on hierarchies button from the editing tool bar or go Tools --> Hierarchies

Select the custom hierarchy option and then start building your hierarchy.

You can just add the Time Hierarchy class and Branch Hierarchy class from the left ban to the right ban. Or you can click new button from the right ban. Then type you hierarchy name. after that start adding dimensions from the left ban to your hierarchy tree. When you finish you can start order your hierarchy level by clicking move up and down buttons. Your hierarchy tree should be like this at the end:

Branch Hierarchy:

-----------------------

| --------- > Region

| --------- >Area

| --------- >Branch

Time Hierarchy:

----------------------

| --------- > As of Date

| --------- > Month

| --------- >Quarter

| --------- >Year

Note That if you even store all your data as detailed in one big table you will be able to build your hierarchy based on dimension that you will select to construct your customer hierarchies. For example assume if the fact table looks like this.

As of date

Month

Quarter

Year

Branch

Area

Region

No of Cust

Total Sales

         


 

This table is no more fact table and we call it a detail table.


 

Scope of analysis:

Now after we finish bulding our univers let go and build our report. Assume that we just need to build a very simple report like this

Year

2008

2009

Region

No of Cust

Total Sales

No of Cust

Total Sales

center

342

23432

234

23432

west

234

23424

424

324


 

Create a new report based on our universe that we build earlier. Select region, year, number of customer and total sales then run the report. After that click on the drill icon (Analysis --> Drill) and then right click on any of the selected dimension (region, year) you will find that there is no option to drill by.

Now edit data provider (Data --> Edit data provider) and click view SQL button for the tool bar. You will find that the data selected are just the four columns that we have selected. Now to find what Scope of Analysis do click on the Scope of Analysis button and select both time and branch hierarchies. Please note that you can expand the hierarchies build before and select a specific dimensions. Let's assume that you want to analysis your figures by quarter, and year only and you are not interested in monthly figures or daily figures. Then all what you need is to put a check mark in the check box beside year and quarter in the time hierarchy tree when you open the scope of analysis window.

Now click again on view SQL button and note that all dimension with a check make beside in scope of analysis added to your SQL statement even if you didn't select them in the query builder window (remember that we have selected 2 dimensions [region and year])

Run the report after that.


 

Drill:

After running the report click on drill icon (analysis à drill) and then right click on region you will find that you can do the following:

  • Drill down: will go to the second level of the hierarchy. In our example it will display the area information and note that there is a drill down filter (combo box) displayed in the drill down filter tool bar. If you right click again on are and select drill down you will go to the second level (branch) and so on. If you filter on a specific region from the drill down menu it will just display the selected region date.
  • Drill up: will go a level up. If you were in area and click on drill up it will return back to region.
  • Drill by: a menu will displayed contains all hierarchy that you have selected in scope of analysis. The menu should be like this if you right click on region dimension
  • Drill by:
    Area
    Branch
    ----------
    Quarter


 

  • Drill through: to select another dimension that you didn't select in scope of analysis. In our example it will be month because we select year and quarter only from the time hierarchy tree.


 

  • Scope of analysis: if you want to update hierarchies that you want to analysis your data according to.
  • Set as drill filter: make this column a drill filter that you can filter your report data from it.


 

Saturday, November 22, 2008

Universe

A universe is a data abstraction layer which is built with the BusinessObjects Designer tool. The universe dose not contains any data itself, it only acts as an interface. This layer is where you define your "Business Objects" [Dimensions, Measures, Details and Filters] according to your business requirements. You will need also to define a valid database connection to the database schema that you want to use to build your universe. Then you can select tables you want or create new derived tables from the existing ones. You can also create joins between tables or let the designer tool automatically detect any reference join defined in the database schema by a reference constrain. The good point is, if the schema for the data base is changed later you will not need to go through all old reports that you build to change them. Just when you change them once in universe it will be reflects in all reports.

This is a simple way to understande the roll of the universe
Database --> Schema (Tables + Columns) --> Universe (Objects [Dimentions, measures, detailes and filters]) --> report.