Hi:
Well, either use the PROC FREQ numbers or use a DATA step or get them from TABULATE.
But I did not mean to imply that you can't do cumulative N or cumulative percent with PROC REPORT. It is totally possible. See below:
For percent of the group, as the original question showed, a slightly more complex compute block is needed. There's a LONG discussion of percents and percents of groups starting with Example 4 on page 22 of this paper: https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf .
For SASHELP.SHOES, it is possible to do cum count and cumpercent of group using a slightly different logic, as shown below:
You could always calculate the numbers in a DATA step program, but that frequently means two passes through the data, which is OK if it makes maintenance easier. But PROC REPORT can do the CUM count and CUM percent too.
Hope this helps,
Cynthia
... View more