Using Calculation View


Advertisements

Calculation views are used to perform complex calculations, which are not possible with Attribute or Analytic view. You can also use Attribute and Analytic views while designing Calculation views.

Following are a few characteristics of Calculation Views −

  • Calculation Views are used to consume Analytic, Attribute, and other Calculation Views.

  • There are two ways to create Calculation Views - Using SQL Editor or Graphical option.

  • It has built-in Union, Join, Projection, and Aggregation nodes.

  • SAP BusinessObjects reporting tools can connect to Calculation view using an OLAP connection for reporting and dashboard.

How to Create a Calculation View?

Choose the Package name under which you want to create a Calculation View. Right-click the Package → Go to New → Calculation View. When you click the Calculation View, a new window will open.

Calculation View

Enter the view name, description and choose the view type as Calculation View, Sub-type Standard or Time (this is a special kind of View, which adds time dimension). You can use two types of Calculation View - Graphical and SQL Script.

Graphical and SQL Script

Calculation view provides an option of using a Star Join or not to use a Star Join. Also, it has two different Data Categories −

  • Cube − When a user selects Cube as data category, the default node is Aggregation. You can choose Star Join with Cube dimension.

  • Dimension − When a user selects Dimension as data category, the default node is Projection.

Calculation View with Star Join

When you use Calculation view with Star Join, it does not allow base column tables, Attribute Views, or Analytic views to add at data foundation. All Dimension tables must be changed to Dimension Calculation views to be used in Star Join. All Fact tables can be added and can use default nodes in Calculation View.

Example

The following example shows how we can use Calculation View with Star Join.

You have four tables, two Dim tables, and two Fact tables. You have to find a list of all employees with their Joining date, Emp Name, empId, Salary, and Bonus.

Employees

Advantages of Using a Star Join

  • It simplifies the design process. You need not create Analytical views and Attribute Views. Fact tables can be directly used as Projections.

  • 3NF is possible with Star Join.

Calculation View Without Star Join

This allows the use of other Attribute views and Analytic views using different nodes available in Calculation Join.

Calculation Join

In the above screenshot, you can see two Analytic views - AN_Fact1 and AN_Fact2 - are used using node Projection 1 and Projection 2 and then joined with the help of a Join node.

Advertisements