Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CDS View how to do sum on field without using group by with all the fields

Former Member
0 Kudos
3,787

I need to build a cds view by joining multiple tables. Now there are about 30 fields in the select.

The requirement is to have a sum on the amount field based on only 2 of the fields selected.

This cannot be achieved with groupby as I need to give all the fields other than the aggregation function inside it where as my requirement isI need to do the sum based on only 2 keys. Can you please suggest

1 REPLY 1

pfefferf
Active Contributor
0 Kudos
702

You can extract the necessary fields into a separate CDS view and join/associate that separate view in your current view.

Regards,

Florian