You are Here: ://SAP HANA – Calculation View ( Creation Using GUI)

SAP HANA – Calculation View ( Creation Using GUI)

Hello Everyone,

In this article, let’s look at Calculation View, which is one more modeling object in SAP HANA and the step by step process to create the same.


What is Calculation View?

A calculation view is a powerful and flexible information view, which can be used to define more advanced logic or complex calculations on the tables or information views available in the SAP HANA. Calculation Views provides the functionality that is available both in Attribute and Analytic View.

Mostly calculation views are used when we were not able to design the business logic with the help of attribute and analytic views. For example, we need measures from more than one fact table or need to define filters on calculated columns.

The data foundation/source of the calculation view can include any combination of tables, column views, attribute views and analytic views.

Calculation Views can be created in two ways, they are

  • Graphical
  • SQL Script

Graphical: The graphical calculation view is built with the help of nodes available in it. We have 5 different nodes available in graphical calculation view, they are

  1. Aggregation
  2. Projection
  3. Join
  4. Union All
  5. Rank

SQL Script: When it comes to SQL script based calculation view, we can write the business logic using native SQL in the way we want. This can be created with the help of CE functions or SQL script.

This type of calculation view can be based on two ways,

  1. CE Functions
  2. SQL Script

Features of Calculation View:

  1. We can create both multi dimension and relational type calculation views.
  2. Supports complex expressions (i.e. IF, Case, Counter, filters, union, RANK).
  3. Supports reusing Analytic views, Attribute views and other Calculation views (Graphical and Scripted).
  4. Supports SAP ERP specific features (i.e. client handling, language, currency conversion).
  5. Provides ability to combine facts from multiple tables.
  6. Provides support for additional data processing operations, (i.e. Union, explicit aggregation).
  7. Provides ability to leverage specialized languages (i.e. R-Lang).
  8. Provides ability to leverage both Column and Row tables.
  9. Performance of certain operations (i.e. star-join, aggregation) are inferior to Analytical Views.


  • Before we go ahead and see the step by steps process of creating a Calculation View in HANA, let’s look at what we want to build.
  • As we discussed in Introduction to modeling in SAP HANA article, the below diagram needs building of two Analytic Views for Sales and Payments and then a calculation view to combine both sales and payments data.


  • We have already created both the analytic views required to create a calculation view. Please go through ‘SAP HANA – Analytic View Creation’ for details on how to create analytic view in SAP HANA.
  • Now business want analyze their sales revenue with their finance data to know more insight on which customer has paid how much amount, what is the remaining debt and so on.
  • To be able to analyze both sales and finance data at the same time, we have to create a calculation views because this involves measures from more than one place.


How to create a Calculation View in SAP HANA?

  • Let’s go through the step by step process of creating a calculation view in SAP HANA.


  • All the modeling objects are grouped into packages in HANA. This first step in modeling objects creation in HANA is to make sure we have package created (in our case ‘sap-student’).
  • To create new calculation view, right click on the package(sap-student) → ‘New’ → Calculation View as shown below.



  • This gives us the initial screen of the creation process where we need to enter technical name of the calculation view and description/label.
  • We can also choose few options here like ‘Copy From’ and ‘Subtype’. For details about ‘Copy From’ and ‘Subtype’ options, please go through article ‘SAP HANA – How to create Attribute View’.
  • Our object name here is ‘CA_SALES_PAYMENTS’ where CA represents ‘CAlculation View’.

The other options we have here along with ‘Copy From’ and ‘Subtype’ are,

  • Type: We can create two types of calculation views as we discussed above. In this article we are going to create a graphical calculation view.
  • Data Category: We have two options here, they are
  1. CUBE: We select this option when we have measures coming out from this view (This is same as OLAP model like analytic view)
  2. DIMENSION: We select this option when we don’t need any measures from the view (this is similar to OLAP structure or relational table).

We have selected ‘CUBE’ for our scenario as we have measures.

  • With Star Join: If we would like to build a calculation like how we see in analytic view with star join, then we need to select this option.

Note: In start join, we cannot use either attribute view or analytic view as source. We can only use either table or calculation views as source.

  • Click ‘Finish’ to proceed further.



  • This step will show us the design area for Calculation View where we build the complete object and activate it once the designing is completed.

We have two main areas here, they are

  • Palette: This area contains all the nodes that can be used as source to build our calculation views.

We have 5 different types of nodes, they are

  1. Join: This node is used to join two source objects and project the result to the next node. The join types can be inner, left outer, right outer and text join.
    Note: We can only have two source objects mapped to a join node.
  2. Union: This is used to perform union all operation between multiple sources. The source can be n number of objects.
  3. Projection: This is used to fine tune our source objects before we use in next nodes like union, aggregation and rank.
    We can choose the selective columns, filter the data and create additional columns.
  4. Aggregation: This is used to perform aggregation on specific columns based the selected attributes.
  5. Rank: This is the exact replacement for RANK function in SQL. We can define the partition and order by clause based on the requirement.
  • Semantics: We can define and maintain the object settings here and can also make use of advanced features like variables, hierarchies and input parameters.

As we have selected data category as ‘CUBE’, we can see the default node as ‘Aggregation’. If the data category was ‘DIMENSION’ then we will have default node as ‘Projection’. We cannot remove the default node, however we can change from one to another.


Proceed to the next page to continue reading…

By | 2016-03-22T04:21:03+00:00 August 27th, 2015|HANA|12 Comments


  1. P August 28, 2015 at 9:16 PM - Reply

    Amazing brother, appreciate your service for HANA, Way to Go….God bless you.

  2. Uma September 1, 2015 at 9:28 AM - Reply

    good work realy useful.. thanks

  3. poluru.sree December 11, 2015 at 12:53 PM - Reply

    Hi Venkatesh,

    First of all I want say a very big thanks to you…
    Awesome information bro…can we expect more videos in HANA(For ex: Videos are avaibale for creating attibute/analytical view but not for creating calculation views…similarly for other as well)?


    • sap student December 11, 2015 at 9:02 PM - Reply

      Hi Venkat,
      Thank you for visiting our website and we are glad you find it helpful. In another 3 or 4 weeks we are releasing an excellent(what we believe) SAP HANA online Course which covers topics from end to end. Total course consist of more than 150 videos and for each new SAP HANA release we will keep adding topics for the course.

      Book mark the link:

      SAP Student.

      • poluru.sree December 12, 2015 at 5:30 AM - Reply

        Thank You very much….

      • Venkat January 1, 2016 at 8:18 AM - Reply

        Hi, Is this course is of free of cost or for money?

        • sap student January 1, 2016 at 12:53 PM - Reply


          It’s a paid course.

  4. shaan December 17, 2015 at 12:08 PM - Reply

    Really very well documented stuff on this site.It would be great if you add latest openings in SAP as a section.This will help many freshers and people who want to change their jobs.

  5. krishna March 22, 2016 at 4:19 PM - Reply


    I am intersted in HANA Technology.

    How much you are charging for entire course.

    Please send me E-Mail about course information.

  6. hello123 January 1, 2017 at 9:06 PM - Reply


    While union of two data sources in cal view is it necessary to have same number of columns from both the data sources? Please explain in detail


    • sap student January 4, 2017 at 4:24 AM - Reply

      Good to have but not mandatory. HANA displays null values for the columns that are not getting data from source.

Leave A Comment

20 + 9 =

Skip to toolbar