cancel
Showing results for 
Search instead for 
Did you mean: 

What the purpose of "counter" in calculation view ?

ding_ye
Explorer
0 Kudos

Hi experts,

How to use the counter of calculation view ?

Whatever column used, it always be '1'.

View Entire Topic
fedaros
Advisor
Advisor
0 Kudos

Hi ding.ye,

The purpose is "to count" records, so what you see is that you have 1 line per aggregated columns (CHGNR and OBJNR).

On your screen shoot, if you query only CHGNR_COUNT and OBJBR you should receive 2 for OBJNR OR000004000608, the other objects has 1 line per each.
if your query request only CHGNR_COUNT you should receive the number of rows on selection.

But there's one trick. Hana internal performance optimizations only count accessed rows, so if you do not request the columns OBJNR and CHGNR the result of CHGNR_COUNT is 1. You need to flag transparent, see Notes on link below:

https://help.sap.com/docs/SAP_HANA_PLATFORM/e8e6c8142e60469bb401de5fdb6f7c00/6a8ed77c21964031aa05849...

Regards, Fernando Da Rós

ding_ye
Explorer
0 Kudos

Hi fedaros

Thank you very much for detailed explanation."On your screen shoot, if you query only CHGNR_COUNT and OBJBR you should receive 2 for OBJNR OR000004000608, the other objects has 1 line per each." It can be achieved by SQL statement like : " SELECT OBJNR , CHGNR_COUNT FROM ... where OBJNR = 'OR000004000608'. "But in graphical view , not using sql, it seems only can be '1', no other values. Am I right ?
fedaros
Advisor
Advisor
0 Kudos

Hi ding.ye,

1 is formula which will be summed up, and HANA is only finding one distinct row due to optimizations.

Did you remember to set transparent for other fields ?

Regards, Fernando Da Rós

ding_ye
Explorer
0 Kudos

Thank you very much.