<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom formatting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969144#M376763</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9248"&gt;@Batman&lt;/a&gt;, you'll want to add a (noedit) picture option after the '&amp;lt;0.5%' since you're not using digit selectors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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 "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%' &lt;FONT color="#FF0000"&gt;(noedit)&lt;/FONT&gt;
	; 
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0n990vq8gxca6n1vnsracr6jp2c.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0n990vq8gxca6n1vnsracr6jp2c.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jun 2025 19:22:02 GMT</pubDate>
    <dc:creator>antonbcristina</dc:creator>
    <dc:date>2025-06-16T19:22:02Z</dc:date>
    <item>
      <title>Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969143#M376762</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Can someone suggest a fix that will make the "&amp;lt;0.5%" format work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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 "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%'
	; 
run;

data a;
	x=.005;
	y=.0003;
run;

proc print data=a;
	var x y;
	format x y custpcttwo.;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jun 2025 19:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969143#M376762</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2025-06-16T19:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969144#M376763</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9248"&gt;@Batman&lt;/a&gt;, you'll want to add a (noedit) picture option after the '&amp;lt;0.5%' since you're not using digit selectors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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 "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%' &lt;FONT color="#FF0000"&gt;(noedit)&lt;/FONT&gt;
	; 
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0n990vq8gxca6n1vnsracr6jp2c.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0n990vq8gxca6n1vnsracr6jp2c.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 19:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969144#M376763</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2025-06-16T19:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969145#M376764</link>
      <description>&lt;P&gt;Where you able to get it to work when you ran it?&amp;nbsp; &amp;nbsp;For me, the formatted value of "y" is still "0%"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 19:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969145#M376764</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2025-06-16T19:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969147#M376765</link>
      <description>&lt;P&gt;Yes, I ran the following code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
   picture custpcttwo 
   /*format values above .5% as whole percentages*/
	.005-high='0009%' (mult=100)
	/*for those btw 0 and .5% format as "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%' (noedit)
	; 
run;

data a;
	x=.005;
	y=.0003;
run;

proc print data=a;
	var x y;
	format x y custpcttwo.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and got:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="antonbcristina_0-1750102675423.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107848i7415611AE4A29F1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="antonbcristina_0-1750102675423.png" alt="antonbcristina_0-1750102675423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 19:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969147#M376765</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2025-06-16T19:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969148#M376766</link>
      <description>&lt;P&gt;I should mention that you also have to move the round picture option since it applies to all values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
   picture custpcttwo &lt;FONT color="#FF0000"&gt;(round)&lt;/FONT&gt;
   /*format values above .5% as whole percentages*/
	.005-high='0009%' (mult=100) 
	/*for those btw 0 and .5% format as "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%' (noedit)
	; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 19:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969148#M376766</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2025-06-16T19:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969149#M376767</link>
      <description>&lt;P&gt;Sorry I forgot to mention, I'd still like to be able to round the value of "x", so it should be 1%.&amp;nbsp; &amp;nbsp;Is that doable?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 20:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969149#M376767</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2025-06-16T20:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969150#M376768</link>
      <description>&lt;P&gt;Yes, as long as you move the round picture option to right after the picture format name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;...
   picture custpcttwo &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(round)&lt;/STRONG&gt;&lt;/FONT&gt;
...&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;edited to include complete solution:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Y&lt;/SPAN&gt;ou'll want to add a (noedit) picture option after the '&amp;lt;0.5%' since you're not using digit selectors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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 "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%' &lt;FONT color="#FF0000"&gt;(noedit)&lt;/FONT&gt;
	; 
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0n990vq8gxca6n1vnsracr6jp2c.htm" target="_blank" rel="nofollow noopener noreferrer"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0n990vq8gxca6n1vnsracr6jp2c.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;I ran the following code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;LI-CODE lang="sas"&gt;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 "&amp;lt;0.5%"*/
	low-&amp;lt;.005 = '&amp;lt;0.5%' (noedit)
	; 
run;

data a;
	x=.005;
	y=.0003;
run;

proc print data=a;
	var x y;
	format x y custpcttwo.;
run;&lt;/LI-CODE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;and got:&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_1-1750163407295.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107855i21A4DB73CCE979EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_1-1750163407295.png" alt="ChrisHemedinger_1-1750163407295.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 12:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-formatting/m-p/969150#M376768</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2025-06-17T12:31:16Z</dc:date>
    </item>
  </channel>
</rss>

