BookmarkSubscribeRSS Feed
sherry88
Calcite | Level 5

Hi,

 

I would like to know how to change all frequencies that are strictly under 10 (0-9) to a blank cell in the rounded data

 

Thank you!

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Do you mean you want these frequencies to APPEAR as blank in a report? Do you mean you want to not use these cells in an analysis? Could you provide a few more details and show us a portion of your data?

--
Paige Miller
sherry88
Calcite | Level 5

I would like these frequencies to appear blank in the report

 

Please see more information attached

 

 

ballardw
Super User

A custom format applied to the statistic in the case of proc tabulate.

Perhaps

 

proc format library=work;
   value  myblank
   0 - 9 =' '
   ;
run;

proc tabulate data =  TITLE;
class CNS_DV 
	  URBAN_RURAL 
	  INDV_CLT_AGE_2018
	  INDV_CLT_GNDR_CD
 	  CLT_PREF_LANG_CD;
format URBAN_RURAL $URB_RUR.
	   INDV_CLT_AGE_2018 AGE_GROUPS.
	   INDV_CLT_GNDR_CD $CLT_GENDER.
 	   CLT_PREF_LANG_CD $LANG.;	
table (CNS_DV = 'Subdivision' * URBAN_RURAL  = 'Urban/Rural'), 
      (INDV_CLT_AGE_2018 = 'Age Groups' * INDV_CLT_GNDR_CD = '' * CLT_PREF_LANG_CD = '') 
        * (N=''*f=myblank.)
		  ;
run;

Other procedures would require different syntax to apply the format.

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 421 views
  • 1 like
  • 3 in conversation