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
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 5365 views
  • 1 like
  • 2 in conversation