Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Calculating Average in Calc View

$
0
0

Hi,


I am trying to create a graphical calculation view using the following data to calculate average of the “Value” column for each “TYPE_NAME”:

Table:

TYPE_ID

TYPE_NAME

VALUE

101

LAPTOP

1

202

DESKTOP

2

303

DESKTOP

3

404

LAPTOP

4

505

DESKTOP

2

 

Steps I performed

 

  1. Created a simple analytic view using the above table.
  2. I created a calculation view with a counter.
  3. In calculation view, I have  1. Analytic View 2. Projection 3. Output
  4. In Output, I have added TYPE_NAME as attribute and VALUE as measure. Created a new counter “COUNTER_ONE” having “TYPE_NAME” as attribute.

Validated and Activated the view. Perfomed Data Preview.

Expected Result was:

TYPE_NAME

VALUE

COUNTER_ONE

LAPTOP

5

2

DESKTOP

7

3

 

The actual result am getting after data preview is shown below:

TYPE_NAME

VALUE

COUNTER_ONE

LAPTOP

5

1

DESKTOP

7

1

 

Even if the above works, how do I calculate the average in a calculated column since the counter does not show in the calculated column.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>