BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DavidPhillips2
Rhodochrosite | Level 12

Is there a way to use a custom format to order and a compute block to determine two different display formats e.g. percent and comma?

 

 

 

proc report data=combined;
format displayNum2 courseOfferingformatValue.; /*this line does not take effect*/
column row_label academic_period, displayNum2;
define row_label / group '' order = internal;
define academic_period / across '';
define displayNum2 / analysis '';
compute displayNum2;
if row_label='Percent of Sections Cancelled' 
then call define(_col_,'format','percent8.2');
else call define(_col_, 'format','comma10.');
endcomp;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
AhmedAl_Attar
Rhodochrosite | Level 12

Hi David,

 

One way I have seen this applied, was in this SGF 2013 paper Census Retires Proc Computab

call define(_col_,"style","....") is used as the output is sent to Excel.

 

No sure if this would be applicable to your ODS destination.

 

Ahmed

View solution in original post

1 REPLY 1
AhmedAl_Attar
Rhodochrosite | Level 12

Hi David,

 

One way I have seen this applied, was in this SGF 2013 paper Census Retires Proc Computab

call define(_col_,"style","....") is used as the output is sent to Excel.

 

No sure if this would be applicable to your ODS destination.

 

Ahmed

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 759 views
  • 0 likes
  • 2 in conversation