Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Hana Studio: 2 Counters in Aggregation Calculation View

$
0
0

Hi Experts,

 

I have the following situation:

 

my data in the aggregation node (short version)

RecordLandField_1Field_2
1DEA
2DEA

3

USB
4FRC
5PLB
6DEB
7USC
8ESC

 

Now I have two counters in the aggregation node, one for Field_1 and one for Field_2

 

I expect the following results:

 

Counter_Field_1 = 3

Counter_Field_2 = 2

 

I get the following results (Because BLANK also is relevant for the counter)

 

Counter_Field_1 = 4

Counter_Field_2 = 3

 

So I tried to do it in a calculated column based on the counters, like this:

 

Counter_Field_1_New = if(Counter_Field_2 > 0, Counter_Field_1 - 1, Counter_Field_1)

Counter_Field_2_New = if(Counter_Field_1 > 0, Counter_Field_2 - 1, Counter_Field_2)


But I can't use the counters in a calculated column.


Anyone an idea how I can get the results that I expect? Can I count the data only if the field is <> blank?


Thanks in advance and best regards

Thorsten


Viewing all articles
Browse latest Browse all 6412

Trending Articles