11-03-2015 09:54 AM
Hi SAS Experts,
I have pre-calculated sums in my source data table:
The custom sums are not logical "sums" top-down
but present a "different" way of summing up.
So I cant use a GROUP and BREAK in my PROC REPORT
but must display those custom sums as if they
indeed where just caused by GROUP and BREAK.
There is the problem of order, how does SAS now
that Asum should come after all the A's and second
how to display my pre-calculated number as a "sum" i.e. GROUP / BREAK.
Can someone point me in the right direction?
@RW9, this is a requirement by the end-user.
I have not chosen to create those weird totals/sums
that do not really represent totals.
11-03-2015 10:07 AM
Just do it in the datastep. If you want subgroups:
if group="Asum" then do;
line=strip(group)||" - "||strip(put(positives,best.));
So set your dataset up eaxctly as you want the output to look, don't try to do illogical things through logical processes. Alternatively, add another variable to group things?
11-03-2015 11:53 AM
If your group and substance values are separate variables you should be okay just calling them grouping variables though you may needt to specify that missing values of substance are okay. And if the values are are precalculated then look at using a listing style report, no summary statistics (sum ) needed.