---
description: What is Calculation View? SAP HANA Calculation view is a powerful information view. SAP HANA Analytic view measure can be selected from only one fact table. When there is need of More Fact table in i
title: "SAP HANA Calculation View: Types &#038; How to Create"
image: https://www.guru99.com/images/sap-hana-calculation-view-1.png
---

[Skip to content](#main)

**⚡ Smart Summary**

Calculation View in SAP HANA is the most powerful information view. It combines tables, column views, analytic views, and other calculation views through join, union, projection, aggregation, and rank nodes.

- 🧩 **Core Purpose:** Handles scenarios needing measures from more than one fact table, which an analytic view cannot do.
- 🗂️ **Data Foundation:** Tables, column views, analytic views, and other calculation views can all be sources.
- 🔧 **Five Node Types:** Join, Union, Projection, Aggregation, and Rank build the scenario graphically.
- ⚖️ **Node Limits:** A join node accepts exactly two sources; a projection accepts one; a union accepts many.
- 🌐 **Built-in Handling:** Client, language, and currency conversion are supported natively.
- ✍️ **Two Flavours:** Graphical views are built in the editor; script based views are written in SQLScript.
- 📊 **Reporting Flexibility:** A calculation view may carry several measures, or none at all for list style reporting.

Read More

![SAP HANA Calculation View](https://www.guru99.com/images/sap-hana-calculation-view-1.png)

## What is Calculation View?

SAP HANA Calculation view is a powerful information view.

SAP HANA Analytic view measure can be selected from only one fact table. When there is need of More Fact table in information view then calculation view come in the picture. Calculation view supports complex calculation.

The data foundation of the calculation view can include tables, column views, analytic views and calculation views.

We can create [Joins](https://www.guru99.com/sap-hana-join.html), Unions, Aggregation, and Projections on data sources.

Calculation View can contain multiple measures and can be used for multidimensional reporting or no measure which is used in list type reporting.

Characteristic of SAP HANA Calculation View as below –

- Support Complex Calculation.
- Support OLTP and OLAP models.
- Support Client handling, language, currency conversion.
- Support Union, Projection, Aggregation, Rank, etc.

SAP HANA Calculation View are of two types –

1. SAP HANA Graphical Calculation View (Created by SAP HANA Studio Graphical editor).
2. SAP HANA Script-based calculations Views (Created by SQL Scripts by [SAP HANA Studio](https://www.guru99.com/sap-hana-studio.html)).

## Graphical vs Script Based Calculation View

The two flavours produce the same kind of object but are built and maintained very differently, and the choice is difficult to reverse once a view is in production.

| Parameter | Graphical | Script based |
| --- | --- | --- |
| Built with | Drag and drop nodes in the editor | SQLScript in a CE\_ or SQL block |
| Optimisation | The engine can prune unused nodes at runtime | Executes as written, less room to optimise |
| Readability | The scenario diagram documents itself | Depends entirely on the author |
| Capability | Covers most requirements | Handles logic no node combination can express |
| Maintenance | Any modeller can follow it | Needs SQLScript skills |
| Recommendation | Default choice | Only where graphical genuinely cannot do it |

The performance point is the decisive one. A graphical view lets HANA discard nodes whose output no column of the query needs, so an unused join costs nothing. A script based view runs every statement it contains regardless. Start graphical, and move a single node to script only when the requirement demands it.

**Don't Miss:**

- [SAP HANA Architecture: Database Overview](https://www.guru99.com/sap-hana-architecture.html)
- [How to Download & Install SAP HANA Studio](https://www.guru99.com/sap-hana-studio.html)
- [SAP HANA Tutorial: Create Sequence](https://www.guru99.com/sap-hana-create-sequence.html)
- [SAP HANA Tutorial PDF – S4 Training Material (Free Download)](https://www.guru99.com/sap-hana-tutorial-pdf.html)

### SAP HANA Graphical Calculation View

In [SAP HANA Analytic view](https://www.guru99.com/sap-hana-analytic-view.html), we can select a measure from one table only.

So when there is a requirement for a view which contains measure from the different table then it cannot achieve by analytic view but by calculation view.

So in this case, we can use two different analytic view for each table and join them in calculation view.

We are going to create a graphical Calculation View “CA\_FI\_LEDGER” by joining two Analytic View “AN\_PURCHASE\_ORDER” And “AN\_FI\_DOCUMENT”.

CA\_FI\_LEDGER will display finance document detail related to a purchase order.

**Step 1)** In this step,

1. Go to package (Here Modelling) and right click.
2. Select New Option.
3. Select Calculation View.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode48.png)

A Calculation View Editor will be displayed, in which Scenario Panel display as below –

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode49.png)

Detail of Scenario panel is as below –

**Palette:** This section contains below nodes that can be used as a 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 pass the result to the next node. The join types can be inner, left outer, right outer and text join. **Note:** We can only add two source objects 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 select columns, filter the data and create additional columns before we use it in next nodes like a union, aggregation and rank. **Note:** We can only add one source objects in a Projection node.
4. **Aggregation:** This is used to perform aggregation on specific columns based on 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.

**Step 2)**

1. Click Projection node from palette and drag and drop to scenario area from Purchase order analytic view. Renamed it to “Projection\_PO”.
2. Click Projection node from palette and drag and drop to scenario area for FI Document analytic view. Renamed it to “Projection\_FI”.
3. Drag and drop analytic View “AN\_PURCHASE\_ORDER” and “AN\_FI\_DOCUMENT” from Content folder to “Projection\_PO” node and “Projection\_FI” node respectively.
4. Click Join Node from Palette and drag and drop to scenario area.
5. Join Projection\_PO node to Join\_1 node.
6. Join Projection\_FI node to Join\_1 node.
7. Click Aggregation node from palette and drag and drop to scenario area.
8. Join Join\_1 node to Aggregation node.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode50.png)

We have added two analytic views, for creating a calculation view.

**Step 3)** Click on Join\_1 node under aggregation and you can see the detail section is displayed.

1. Select all column from Projection\_PO Node for output.
2. Select all column from Projection\_FI node for output.
3. Join Projection\_PO Node to Projection\_FI node on column Projection\_PO.PO\_Number = Projection\_FI.PO\_NO.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode51.png)

**Step 4)** In this step,

1. Click on Aggregation node and Detail will be displayed on right side of the pane.
2. Select Column for output from the Join\_1 displayed on the right side in the detail window.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode52.png)

**Step 5)** Now, click on Semantics Node.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode53.png)

Detail screen will be displayed as below. Define attribute and measure type for the column and also, mark key for this output.

1. Define attribute and measure.
2. Mark PO\_Number and COMPANY as Key.
3. Mark ACC\_DOC\_NO as key.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode54.png)

**Step 6)** Validate and Activate calculation View, from the top bar of the window.

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode55.png)

1. Click on Validate Icon.
2. Click on Activate Icon.

Calculation View will be activated and will display under Modelling Package as below –

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode56.png)

Select calculation view and right click -> Data preview

We have added two analytic views and select measure (TAX\_AMOUNT, GROSS\_AMOUNT) from both analytic view.

Data Preview screen will be displayed as below –

[![SAP HANA Graphical Calculation View]()](https://www.guru99.com/images/sap-hana/030216_1026_SAPHANAMode57.png)

### CE Functions in Script Based Views

**⚠️ Version note:** Calculation Engine plan operators, the CE\_ functions described below, are deprecated by SAP. They remain documented here because a great deal of existing code uses them, but new development should use standard SQL, which the optimiser now handles at least as well. Mixing CE\_ functions and SQL in one statement is also a known cause of poor plans.

**CE Functions also known as Calculation Engine Plan Operator (CE Operators) are alternative to SQL Statements.**

CE function is two types –

**Data Source Access Function**

This function binds a column table or a column view to a table variable. Below is some data Source Access Function list –

- CE\_COLUMN\_TABLE
- CE\_JOIN\_VIEW
- CE\_OLAP\_VIEW
- CE\_CALC\_VIEW

**Relational Operator Function**

By Using Relational Operator, the user can bypass the [SQL](https://www.guru99.com/sql.html) processor during the evaluation and communicate with calculation engine directly. Below is some Relational Operator Function list –

- CE\_JOIN (It is used to perform inner join between two sources and Read the required columns/data.)
- CE\_RIGHT\_OUTER\_JOIN (It is used to perform right outer join between the two sources and display the queried columns to the output.)
- CE\_LEFT\_OUTER\_JOIN (It is used to perform left outer join between the sources and display the queried columns to the output).
- CE\_PROJECTION (This function display the specific columns from the source and apply filters to restrict the data. It provides column name aliase features also.)
- CE\_CALC (It is used to calculate additional columns based on the business requirement. This is same as calculated column in graphical models.)

Below is a list of [SQL](https://www.guru99.com/sql.html) with CE function with some Example-

| Query Name | SQL Query | CE-Build in Function |
| --- | --- | --- |
| Select Query On Column Table | SELECT C, D From “COLUMN\_TABLE”. | CE\_COLUMN\_TABLE(“COLUMN\_TABLE”,\[C,D]) |
| Select Query On Attribute View | SELECT C, D From “ATTRIBUTE\_VIEW” | CE\_JOIN\_VIEW(“ATTRIBUTE\_VIEW”,\[C,D]) |
| Select Query on Analytic View | SELECT C, D, SUM(E) From “ANALYTIC\_VIEW” Group By C,D | CE\_OLAP\_VIEW(“ANALYTIC\_VIEW”,\[C,D]) |
| Select Query on Calculation View | SELECT C, D, SUM(E) From “CALCULATION\_VIEW” Group By C,D | CE\_CALC\_VIEW(“CALCULATION\_VIEW”,\[C,D]) |
| Where Having | SELECT C, D, SUM(E) From “ANALYTIC\_VIEW” Where C = ‘value’ | var1 = CE\_COLUMN\_TABLE(“COLUMN\_TABLE”);<br>CE\_PROJECTION(:var1,\[C,D],'”C” = ”value”’) |

## Calculation View Types: Dimension, Cube and Cube with Star Join

Current SAP HANA releases ask for a data category when a calculation view is created, and the choice determines what the view can do and how reporting tools treat it.

| Data category | Contains measures | Star join available | Replaces |
| --- | --- | --- | --- |
| Dimension | No | No | Attribute view |
| Cube | Yes | No | Simple analytic scenarios |
| Cube with Star Join | Yes | Yes | Analytic view |

This is why current projects often build only calculation views. A view of category Dimension does the work of an [attribute view](https://www.guru99.com/sap-hana-attribute-view.html), and Cube with Star Join does the work of an [analytic view](https://www.guru99.com/sap-hana-analytic-view.html), so one object type covers the whole model. Existing attribute and analytic views continue to work, and the concepts map directly onto the categories above.

## Calculation View Performance Tips

A calculation view is flexible enough to be built badly, and the same scenario can run in a second or a minute depending on how the nodes are arranged. Six rules cover most of the difference.

1. **Filter as early as possible.** Put a filter in the projection nearest the source. Filtering after an aggregation means the whole data set was aggregated first, then most of it discarded.
2. **Aggregate before joining where possible.** Joining two large detail sets and aggregating afterwards moves far more rows than aggregating each side first.
3. **Select only the columns you need.** Every column carried through a node is held in memory for the whole execution, and unused columns block node pruning.
4. **Prefer union to join for combining like data.** Stacking actuals and plan is a union. Expressing it as a join multiplies rows and then needs a filter to undo the damage.
5. **Watch the join cardinality.** Declaring 1..1 where the data is 1..N duplicates rows and inflates every measure, which is the most common cause of wrong totals.
6. **Avoid stacking views too deeply.** A calculation view on a calculation view on an analytic view is legal but hard to optimise and harder to debug. Two levels is usually enough.

Use the Performance Analysis tools in the editor rather than guessing. PlanViz shows which node consumed the time, and the answer is frequently a filter placed one node too late. The wider approach is described in the [SAP HANA modeling](https://www.guru99.com/sap-hana-modeling.html) tutorial, and procedural alternatives in [SQL Script](https://www.guru99.com/sap-hana-sql-script.html).

## FAQs

🔗 Why can a join node take only two sources?

A join is a binary operation, so the node mirrors that. Joining three sources means chaining two join nodes, which also makes the evaluation order explicit.

🚫 Should new views still use CE functions?

No. Calculation Engine plan operators are deprecated. Existing code keeps working, but standard SQL is the recommended approach and generally produces a better execution plan.

🤖 Can AI optimise a slow calculation view?

Yes. Reading the PlanViz output, AI identifies the node consuming the time and commonly recommends moving a filter earlier or aggregating before a join.

🧠 Can AI migrate CE function code to SQL?

Yes. Each CE\_ operator has a direct SQL equivalent, so AI can translate the block and highlight the few cases where behaviour differs. Compare results before replacing production code.

📉 Can a calculation view have no measures at all?

Yes. A view of data category Dimension carries only attributes and is used for list style reporting or as a reusable master data source for other views.

#### Summarize this post with:

ChatGPTPerplexityGrokGoogle AI

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.**

##### Sign up for the newsletter

Subscribe for Free

You have successfully subscribed.  
Please check your inbox.

![AI-Newsletter]() Chosen by over **350,000+** professionals

[Scroll to top](#wrapper)

×

Search for:

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/sap-hana-calculation-view-1.png","url":"https://www.guru99.com/images/sap-hana-calculation-view-1.png","width":"700","height":"250","caption":"SAP HANA Calculation View","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/sap-hana-calculation-view.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/sap-hana","name":"SAP-HANA"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/sap-hana-calculation-view.html","name":"SAP HANA Calculation View: Types &#038; How to Create"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/sap-hana-calculation-view.html#webpage","url":"https://www.guru99.com/sap-hana-calculation-view.html","name":"SAP HANA Calculation View: Types &#038; How to Create","dateModified":"2026-10-09T13:26:05+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/sap-hana-calculation-view-1.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/sap-hana-calculation-view.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/editorial","name":"Editorial Team","url":"https://www.guru99.com/author/editorial","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/favicon-new-logo.png","url":"https://www.guru99.com/images/favicon-new-logo.png","caption":"Editorial Team","inLanguage":"en-US"},"sameAs":["https://www.guru99.com/editorial-team"],"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"SAP-HANA","headline":"SAP HANA Calculation View: Types &#038; How to Create","description":"What is Calculation View? SAP HANA Calculation view is a powerful information view. SAP HANA Analytic view measure can be selected from only one fact table. When there is need of More Fact table in i","keywords":"sap-hana","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/editorial","name":"Editorial Team"},"dateModified":"2026-10-09T13:26:05+05:30","image":{"@id":"https://www.guru99.com/images/sap-hana-calculation-view-1.png"},"copyrightYear":"2026","name":"SAP HANA Calculation View: Types &#038; How to Create","subjectOf":[{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Why can a join node take only two sources?","acceptedAnswer":{"@type":"Answer","text":"A join is a binary operation, so the node mirrors that. Joining three sources means chaining two join nodes, which also makes the evaluation order explicit."}},{"@type":"Question","name":"Should new views still use CE functions?","acceptedAnswer":{"@type":"Answer","text":"No. Calculation Engine plan operators are deprecated. Existing code keeps working, but standard SQL is the recommended approach and generally produces a better execution plan."}},{"@type":"Question","name":"Can AI optimise a slow calculation view?","acceptedAnswer":{"@type":"Answer","text":"Yes. Reading the PlanViz output, AI identifies the node consuming the time and commonly recommends moving a filter earlier or aggregating before a join."}},{"@type":"Question","name":"Can AI migrate CE function code to SQL?","acceptedAnswer":{"@type":"Answer","text":"Yes. Each CE operator has a direct SQL equivalent, so AI can translate the block and highlight the few cases where behaviour differs. Compare results before replacing production code."}},{"@type":"Question","name":"Can a calculation view have no measures at all?","acceptedAnswer":{"@type":"Answer","text":"Yes. A view of data category Dimension carries only attributes and is used for list style reporting or as a reusable master data source for other views."}}]}],"@id":"https://www.guru99.com/sap-hana-calculation-view.html#schema-1147683","isPartOf":{"@id":"https://www.guru99.com/sap-hana-calculation-view.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/sap-hana-calculation-view.html#webpage"}}]}
```
