cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregating a calculation view proxy entity

andrefernandes
Participant
0 Kudos

Tutorials: https://developers.sap.com/tutorials/hana-cloud-cap-calc-view.html
--------------------------

Hey folks,

While doing the tutorial, I wondered how the setup would handle aggregations in the calculation view. The tutorial used DIMENSION as Data Category for the calculation view, but what if it used CUBE instead with a simple counter as a calculated column?

I did a quick test just adding COUNTER to an aggregation calc view.

If we queried in the resulting odata service something like /V_Aggregation?$select=COUNTER,INTHEADER_ID, I would expect 3 entries (as there are three unique INTHEADER_ID values in the Items table) as well as the number of times that value appears:

Instead, however, I saw the values were not aggregated at all

How can we enforce the aggregation on the calculation view side?

Best regards,

André

johnmurray
Participant
0 Kudos

Does the Calc View show the expected output correctly when you view in the calc view editor? And if you select just those two columns from the calc view in SQL does it display correctly?

andrefernandes
Participant
0 Kudos

jmurray91 It looks alright on the calc view side.

Had I not been using CAP, but xsodata instead, the /V_Aggregation?$select=COUNTER,INTHEADER_ID query would have given me that exact result as well.

Accepted Solutions (0)

Answers (0)