Hello,
I have managed to run Proc Tabulate with 3 pieces of data. However, upon running it, the results show a row labeled "Sum", below which, have the numbers I want. However, is there a way show these number without having the word "Sum". I am aware of simply doing proc print.
Here is my code:
PROC TABULATE DATA= sh.totals1 OUT= sh.tab1;
VAR weight_agg agg_mort Total;
Title Data1;
TABLE weight_agg Total agg_mort;
RUN;
PROC TABULATE DATA= sh.totals2 OUT= sh.tab2;
VAR weight_agg agg_mort Total;
Title Data2;
TABLE weight_agg Total agg_mort;
RUN;
PROC TABULATE DATA= sh.totals3 OUT= sh.tab3;
VAR weight_agg agg_mort Total;
Title Data3;
TABLE weight_agg Total agg_mort;
RUN;
PROC TABULATE DATA= sh.totals4 OUT= sh.tab4;
VAR weight_agg agg_mort Total;
Title Data4;
TABLE weight_agg Total agg_mort;
RUN;Thank you in advance.
See if this example helps?
You need something like TABLE sex ,(height weight) * mean = ' ' ;
PROC TABULATE data=sashelp.class;
CLASS sex;
VAR height weight;
TABLE sex ,
(height weight) * mean = ' ' ;
RUN;
as opposed to
PROC TABULATE data=sashelp.class;
CLASS sex;
VAR height weight;
TABLE sex ,
(height weight) * mean ;
RUN;
See if this example helps?
You need something like TABLE sex ,(height weight) * mean = ' ' ;
PROC TABULATE data=sashelp.class;
CLASS sex;
VAR height weight;
TABLE sex ,
(height weight) * mean = ' ' ;
RUN;
as opposed to
PROC TABULATE data=sashelp.class;
CLASS sex;
VAR height weight;
TABLE sex ,
(height weight) * mean ;
RUN;
Yes! Thank you. i simply put " *Sum = ' ' " and it stopped showing that row.
If you have a complex table or multiple tables and want to change the appearance for all instances of one or more statistics that can be done similarly in a KEYLABEL statement.
Keylabel sum=' '; would change the behavior for all of the SUM requests in all tables for a proc tabulate call.
Additionally when doing multiple similar tables you might consider combining your data sets and adding a variable that identifies the source. Then use the combined data set with that variable as the PAGE dimension, one more row before the current table statements.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.