BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Batman
Quartz | Level 8

Can someone suggest a fix that will make the "<0.5%" format work?

 

proc format;
   picture custpcttwo 
   /*format values above .5% as whole percentages*/
	.005-high='0009%' (round) (mult=100)
	/*for those btw 0 and .5% format as "<0.5%"*/
	low-<.005 = '<0.5%'
	; 
run;

data a;
	x=.005;
	y=.0003;
run;

proc print data=a;
	var x y;
	format x y custpcttwo.;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Batman
Quartz | Level 8

Never mind.   Posted this in the wrong thread.   I'll post it in SAS programming.

View solution in original post

2 REPLIES 2
Batman
Quartz | Level 8

Never mind.   Posted this in the wrong thread.   I'll post it in SAS programming.

Ksharp
Super User
proc format;
   picture custpcttwo(round) 
   /*format values above .5% as whole percentages*/
	.005-high='0009%'  (mult=100)
	/*for those btw 0 and .5% format as "<0.5%"*/
	low-<.005 = '<0.5%' (noedit)
	; 
run;

data a;
	x=.005;
	y=.0003;
run;

proc print data=a;
	var x y;
	format x y custpcttwo.;
run;

Ksharp_0-1750128655370.png

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

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