<?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: Add percentage sign to output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868523#M343103</link>
    <description>&lt;P&gt;From the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p1g617vn5t3p39n0z9o601rw74jz.htm#p1t0en9wtu0unmn1lpmc8s3oyegm" target="_self"&gt;PROC TABULATE documentation&lt;/A&gt;, you just need to add a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;format modifiers&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;define how to format values in cells. Use the asterisk (*) operator to associate a format modifier with the element (an analysis variable or a statistic) that produces the cells that you want to format. Format modifiers have the form&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;f=format&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryTip"&gt;Tip&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Format modifiers have no effect on CLASS variables.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summarySee"&gt;See&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;For more information about specifying formats in tables, see &lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n06lpswpmf54vin1lu87u781bncv.htm" target="_blank"&gt;Formatting Values in Tables&lt;/A&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryExample"&gt;Example&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;&lt;LI-CODE lang="sas"&gt;Sales*f=dollar8.2&lt;/LI-CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, you want the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/fedsqlref/n0698uao6iyivgn17f2yngc1su0l.htm" target="_self"&gt;PERCENTw.d format&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2023 21:03:01 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-04-06T21:03:01Z</dc:date>
    <item>
      <title>Add percentage sign to output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868518#M343102</link>
      <description>&lt;P&gt;I would like to have the output from this code apply a percentage sign.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;tabulate&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;class URMG Department Period;&lt;/P&gt;&lt;P&gt;table (department all), Period*URMG*(pctn&amp;lt;URMG&amp;gt;)/printmiss misstext='0' nocellmerge;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 20:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868518#M343102</guid>
      <dc:creator>DavidKaib</dc:creator>
      <dc:date>2023-04-06T20:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add percentage sign to output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868523#M343103</link>
      <description>&lt;P&gt;From the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p1g617vn5t3p39n0z9o601rw74jz.htm#p1t0en9wtu0unmn1lpmc8s3oyegm" target="_self"&gt;PROC TABULATE documentation&lt;/A&gt;, you just need to add a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;format modifiers&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;define how to format values in cells. Use the asterisk (*) operator to associate a format modifier with the element (an analysis variable or a statistic) that produces the cells that you want to format. Format modifiers have the form&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;f=format&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryTip"&gt;Tip&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Format modifiers have no effect on CLASS variables.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summarySee"&gt;See&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;For more information about specifying formats in tables, see &lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n06lpswpmf54vin1lu87u781bncv.htm" target="_blank"&gt;Formatting Values in Tables&lt;/A&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryExample"&gt;Example&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;&lt;LI-CODE lang="sas"&gt;Sales*f=dollar8.2&lt;/LI-CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, you want the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/fedsqlref/n0698uao6iyivgn17f2yngc1su0l.htm" target="_self"&gt;PERCENTw.d format&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 21:03:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868523#M343103</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-06T21:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add percentage sign to output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868525#M343105</link>
      <description>&lt;P&gt;You will have to create a custom format to work with the Tabulate PCT functions.&lt;/P&gt;
&lt;P&gt;You don't say how many decimals you might want. The example below will show 1 decimal point.&lt;/P&gt;
&lt;PRE&gt;proc format;
picture custpct
0 - high ='0009.9%'
;
run;&lt;/PRE&gt;
&lt;P&gt;Read the documentation of the Proc Format Picture statement for details.&lt;/P&gt;
&lt;P&gt;How to modify your code to use the format:&lt;/P&gt;
&lt;PRE&gt;proc tabulate;
   class URMG Department Period;
  table (department all), 
           Period*URMG*(pctn&amp;lt;URMG&amp;gt;&lt;FONT color="#800080"&gt;&lt;STRONG&gt;*f=custpct.&lt;/STRONG&gt;&lt;/FONT&gt;)
          /printmiss misstext='0' nocellmerge;
run;&lt;/PRE&gt;
&lt;P&gt;The *F=&amp;lt;some format&amp;gt; overrides the default format for that particular PCTN or other percent calculations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 21:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868525#M343105</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-06T21:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Add percentage sign to output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868527#M343107</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;From the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p1g617vn5t3p39n0z9o601rw74jz.htm#p1t0en9wtu0unmn1lpmc8s3oyegm" target="_self"&gt;PROC TABULATE documentation&lt;/A&gt;, you just need to add a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;format modifiers&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;define how to format values in cells. Use the asterisk (*) operator to associate a format modifier with the element (an analysis variable or a statistic) that produces the cells that you want to format. Format modifiers have the form&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;f=format&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryTip"&gt;Tip&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Format modifiers have no effect on CLASS variables.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summarySee"&gt;See&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;For more information about specifying formats in tables, see &lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/n06lpswpmf54vin1lu87u781bncv.htm" target="_blank" rel="noopener"&gt;Formatting Values in Tables&lt;/A&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryExample"&gt;Example&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;&lt;LI-CODE lang="sas"&gt;Sales*f=dollar8.2&lt;/LI-CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, you want the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/fedsqlref/n0698uao6iyivgn17f2yngc1su0l.htm" target="_self"&gt;PERCENTw.d format&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The internal values that Tabulate applies the format to are multiplied by 100. So what would default to appearing as 15.1 will result in 1510% with wide enough Percentw.d format applied.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 21:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-percentage-sign-to-output/m-p/868527#M343107</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-06T21:09:50Z</dc:date>
    </item>
  </channel>
</rss>

