cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the COUNT in Calculation view

Former Member
0 Kudos

Hi Frzz,

I need to calculated the total number of records with particular fields combination in Scripted Calculation view.

Could some one please guide me how can i achieve it??

Best Regards,

Krishna.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Frzz,

No one have answer for this???

Former Member
0 Kudos

Hi Krishna,

Can you paste your error here?

Regards,

Siva

Former Member
0 Kudos

Hi Siva,

I was not getting any error. But was getting all 1's in the counter fields. After using aggregation on counter the issue got resolved.

Krishna

Former Member
0 Kudos

I have following situation  with a HANA Calculation View output

COLUMN1      COLUMN2     COLUMN3     
TECH111      A11111      MATERAL1 
TECH111      A11112      MATERAL2
TECH111      A11112      MATERAL3
TECH111      A11113      MATERAL4
TECH112      A11113      MATERAL5
TECH112      A11114      MATERAL6
TECH112      A11115      MATERAL7
TECH112      A11116      MATERAL8

I want to get the count for each unique value papering with the combination of column1 and Column 2

i.e.A11111 appears 1 time, A11112 and A11113 appears 2 time and so on..

COLUMN1    COLUMN2  COLUMN3   COLUMN4 

TECH111      A11111      MATERAL1        1                   

TECH111      A11112      MATERAL2        2                   

TECH111      A11112      MATERAL3        2                      

TECH111      A11113      MATERAL4        2                   

TECH112      A11113      MATERAL5        2                   

TECH112      A11114      MATERAL6        1                   

TECH112      A11115      MATERAL7        1                   

TECH112      A11116      MATERAL8        1                   

I want to achieve this inside a graphical Calculation view. I tried to create a Calculated Column for the counter but it did not work.


Can someone please help me in getting it.


Best Regards,

Krishna.

Former Member
0 Kudos

I tried creating the counter with the CONTER option which is available in the default Aggregation Node. But result is all 1's in counter field. Not sure how this counter works.

Former Member
0 Kudos

Hi,

Some one please help me out here.

Thank you.

Krishna.

former_member182302
Active Contributor
0 Kudos

Hi Krishna,

Seems like this is the same example you worked on:

Did the counter approach didnt work for you?

In the Aggregation node, did you only select COL2 and COL3 and kept the counter definition on COL3?

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna,

Thanks for ur help. I have done it by selecting two aggregation nodes.  Now its working thank you.

Best Regards,

Krishna.

former_member182302
Active Contributor
0 Kudos

Welcome Krishna