In this blog I am going to explaining about How To Find Average.

Average : The sum of all of the numbers in a list divided by the number of items in that list.

In my calculation view I am taking student four subject marks and finding the average to that marks using Calculated Column.

Calculated Column : It is an additional column which can be created by us, the results of which are calculated at run time based on the existing column and using either functions, input parameters and constants.

Following are the steps to implement “How To Find Average In Calculated Column Using Calculation View In SAP HANA”.

Step 1: Create one Table with the name “STUDENT_DETAILS” in our schema with following structure

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Insert Below Values into our Table

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Step 2: Create Calculation view in our package with the name “STUDENT_CLASS”

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Select STUDENT_DETAILS table in projection and Select the all columns.

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Create One calculated column for Calculating Average.

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Add projection to aggregation and select the calculated columns MARKS_PERCENTAGE

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Save and Activate the View.

select the data preview.

Output:

How To Find Average In Calculated Column Using Calculation View In SAP HANA

Above output we can see the Average in last column.

 

 

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !