Hi,
Does anyone have any advice on how I can get my proc tabulate to use the formats I assigned in the code? I have tried a few different things and have been unsuccessful. I would like my count column to use format comma10.0. and my cost column to use format dollar12.. Thank you!
data My_data;
set Data;
format count comma10.0 cost dollar12.;
run;
Proc tabulate data=My_data;
class type Year /order=data ;
var cost count;
table type='Type'*Year="SFY",cost="Cost" count="Count" /printmiss
rts=32 ;
format count comma10.0 cost dollar12.;
run;
You should be able to set the formats in the TABLE statement itself, just use *F=.
Example:
proc tabulate data=sashelp.class;
class sex;
var age height ;
table sex,age*sum*f=10. height*mean*f=5.2 ;
run;
You should be able to set the formats in the TABLE statement itself, just use *F=.
Example:
proc tabulate data=sashelp.class;
class sex;
var age height ;
table sex,age*sum*f=10. height*mean*f=5.2 ;
run;
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.