BookmarkSubscribeRSS Feed
Reddi
Fluorite | Level 6

Hi ,

 

I would like to see the percentages instead of the numbers after running the following program.

 

    

 

proc report data=final_modelling1 nowd out=samp(drop=_BREAK_ where=(type NE "") rename=(_C2_=pr_susp_N _C3_=pr_susp_Y));

  title '2) With Group Usage';

  column type pr_susp,canc_from_del ,sum ;

  define type / group;

  define pr_susp / across '--pr_susp--';

  define canc_from_del / analysis sum '';

/*  define n  / 'Count';*/

/*  define sum / 'Group Total Value';*/

  define sum / '' /*f=percent9.2*/;

  rbreak after / summarize;

run;

 

 pr_susp_Npr_susp_y
Type112561596
Type228695496

 

instead I'd like to have the output dataset like below ,

 

 pr_susp_Npr_susp_y
Type111.2%14.2%
Type225.6%49.0%

 

Is there a way to get the required output please?

1 REPLY 1

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 437 views
  • 0 likes
  • 2 in conversation