cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the sum of columns and display without duplicates.

former_member724358
Discoverer
0 Kudos

qweasd-li.jpg

In my case, I am looking to sum the values in "Disposals_CC3" column and display as a single value.

Any suggestions on doing this would be helpful.

Thanks,

Sab

former_member34
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since you're new in asking questions here, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful), share screenshots of what you've seen/done, make sure you've applied the appropriate tags, and use a more descriptive subject line. The more details you provide, the more likely it is that members will be able to assist you. You should also make sure you're using all the appropriate tags, so the right experts can find your question.

Should you wish, you can revise your question now by selecting Actions, then Edit.

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS . By personalizing your profile with a photo of you, you encourage readers to respond.

Best regards

Jennifer

SAP Community moderator

Accepted Solutions (1)

Accepted Solutions (1)

KonradZaleski
Active Contributor
0 Kudos

You need yo use GROUP BY operator and list there all attributes, and for measures add SUM as an aggregation function.

SELECT
  <List all attribute columns separated by comma>
,SUM("Disposals_CC3") FROM
table
GROUP BY <List all attribute columns separated by comma>

For example:

SELECT
  TXK50
  ,KTOPL
,SUM("Disposals_CC3") FROM
table
GROUP BY TXK50 ,KTOPL

Answers (0)