BookmarkSubscribeRSS Feed
deleted_user
Not applicable
How can i add a cumulative grand total to my proc tabulate report? OR is this even possible!

Here is my code:

PROC TABULATE data=RepCore.aggregate2 ;
CLASS week date signer APPOINTMENT sale;
VAR Num ;
TABLE week * (date='' ALL='Total Week') ALL='Park Total',
Signer='Region' * (N='Total' ROWPCTN='% For Day')
APPOINTMENT*(N PCTN *F=6.1)
SALE*(N PCTN *F=6.1)
ALL='Grand Total'/ MISSTEXT='0';

RUN; Just heard this is not possible 😞 oh well back to the drawing board


Message was edited by: Jenzie
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Proc Report will let you calculate a cumulative column inside a COMPUTE block. And, a DATA step report would let you calculate a cumulative column.

The issue with PROC TABULATE is that it really only writes one cell at a time in one row at a time, so there is no visibility of the "previous" value in a previous report row and no ability to apply your own assignment statement to a column.

But since you do have this functionality with PROC REPORT or DATA step, it's just not possible with TABULATE.

cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 4955 views
  • 1 like
  • 2 in conversation