BookmarkSubscribeRSS Feed
Calcite | Level 5


I got following data:


Name Amount

1         100

1         200

2         300

2         ...

3         ..

3         ..

3         ..


What procedure is best to use to create following report/output:


1st Col     2ndCol                                          3rd                                                               4th

Name1     Aggregated Sum of Amount of Name1         Cum. Percentage of Agg.Sum Name1        Counts of Name1

Name2     Aggregated Sum of Amount of Name2         Cum. Percentage of Agg.Sum Name1        Counts of Name1

Name3    Aggregated Sum of Amount of Name3          Cum. Percentage of Agg.Sum Name1        Counts of Name1



Total....  Total of Aggregated Sum             100%                                                               Total Counts


Number of Missing:



I tried it with proc report so far, but I did not get the desired results´. I'm using SAS Enterprise Guide, so I'm also open to drag & drop solutions.






Without a better understanding of how you plan to calculate the "cum percentage", this is a nearly impossible task.
For example, your name1 has a 2 rows with total amount of 300. So I assume that your column 2 value would be 300 and your column 4 value would be 2. But, how to calculate the cum percentage based on 300 -- what is the denominator to calculate the percentage? The total of all the amount values?

I don't understand what you mean by number of missing? Number of rows with missing names, with missing amounts? Why/how would you have a name without an amount or an amount without a name?

Can you post some data, just a small sample and then show, EXACTLY, what results you expect given your data. Because without any information on how to base "cum percentage", it is impossible to make a constructive suggestion -- there's not enough information.

Diamond | Level 26

Pviot Reports on Aggregated Data- Proc report, proc means or proc summary ?


Why does it have to be one of these three? Why not one of the above (specifically PROC MEANS or PROC SUMMARY), followed by a DATA step?

Paige Miller



Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.


Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation