Skip to Content

This is an extension to my previous post on Analytic View SAP HANA – How to Create Analytic Views

In this post we will try to look at the Calculated columns and Restricted Columns in Analytic Views.

H1.png

CALCULATED COLUMN :

Calculated Column in analytic view is of two types 1.Measure  2.Attribute

In this example we gonna create a new calculated column measure called TOTAL_AMOUNT which is calculated by multiplying Order Quantity(from Data Foundation) and Material Unit Price(from Attribute View)

1. Right click on the CALCULATED COLUMNS tree structure under output ( screen shot above)

2. Provide the necessary information in the popup’d window. Name, Data Type,Column Type(here Measure).

H1.png

   In the expression editor drag and drop the fields from the ELEMENTS on which we need to calculate. In this example we are selecting QUANTITY from the output columns list of Data Foundation and UNIT PRICE from the output column list of Attribute View AV_MATERIAL_INFO like below

different Operations and Functions available.

H1.png

3. Click OK and CHECK and ACTIVATE the analytic view.

4, Now newly create calculated column is available for reporting.

H1.png

RESTRICTED COLUMN :

Restricted column is used to restrict a measure based on a condition of master data.This feature helps us to push the processing of data set result into HANA rather than to client side.

In this example we gonna created a restricted measure of Net Amount only for product category “Flat Screens”

1. Right Click on Restricted Column in output panel of the analytic view

2. Provide the necessary information like below, Select the restricted measure column here Net Amount and Add Restriction column here Product Category and select the value as “Flat Screens

H1.png

3. Click OK and CHECK and ACTIVATE. Go to Data Preview here you can see a new restricted column was added in which the values are displayed for which Product Category = Flat Screens for other it is null( ? ).

H1.png

In Analysis Tab

H1.png

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Praga V

    Hi Naga Prakash,

    Good day mate!

    I have created an Analytical view with a Calculated column Product_Price.. The AN view has a Fact table Sales and an Attribute view(AT View having only Product table)..

    Basically the Calculate column is a direct mapping from AT view.Product.Product_Price.

    I actually need to use the Calculated column in my Calculation view.

    But when I am trying to validate the CV, I am always getting an error saying the calculated column does not exist.

    Please shed some light on this..

    Regards,

    Praga

    (0) 

Leave a Reply