Skip to Content
0

Calculating Average for Attribute Value in SAP HANA GRAPHICAL VIEW Ask Question

Feb 25 at 10:23 PM

63

avatar image
Former Member
    
 ColumnA    ColunmnB   ColumnC  ColumnC
     A         10       xyz      Ab
     A         20       def      Ab
     A         5        mno      Xy
     B         10       pqr      Ab
     B         40       abc      Xy
     C         10       uvw      Xy

I need to calculate total average as well as average for each value of ColumnD

Total Average(divided by unique ColumnA):

(10+20+5+10+40+10)/3=31.66

Now I need Average for Ab=>

(10+20+10)/2

Average for Xy=>

(5+40+10)/2

I made Calculated Column in Hana:

Counter-> CA_Count on ColumnA(to get unique Count) CA_Avg ->

ColumnB/CA_Count

for Avg of Ab: CA_AVG_Ab :

if(ColumnD='Ab',CA_Avg,0)

but this Value is not coming correctly when we use filter in output

10 |10000 characters needed characters left characters exceeded
0
* Please Login or Register to Answer, Follow or Comment.

0 Answers