<?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: PERCENTAGE FORMAT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876594#M346306</link>
    <description>&lt;P&gt;You have to tell the FORMAT statement what variable(s) you want the PERCENT format to be attached to.&amp;nbsp; It cannot read your mind.&amp;nbsp; That is why it is telling you that it is expecting a NAME or a variable list here it has indicated it detected the error.&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2023 02:28:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-05-19T02:28:13Z</dc:date>
    <item>
      <title>How i get output in percentage format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876517#M346286</link>
      <description>&lt;P&gt;DATA&amp;nbsp; XYZ;&lt;BR /&gt;SET XYZ_V1;&lt;BR /&gt;KEEP DTS COD Q_1 Q_2 Q_3 Q_4 QPC_1 QPC_2 QPC_3 QPC_4 TOTAL_SUM;&lt;BR /&gt;LENGTH QPC_1 QPC_2 QPC_3 QPC_4 $6;&lt;BR /&gt;QPC_1=Q_1/TOTAL_SUM;&lt;BR /&gt;QPC_2=Q_2/TOTAL_SUM;&lt;BR /&gt;QPC_3=Q_3/TOTAL_SUM;&lt;BR /&gt;QPC_4=Q_4/TOTAL_SUM;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;HOW DO I GET OUTPUT IN A PECENTAGE FORMAT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 02:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876517#M346286</guid>
      <dc:creator>Brownisiak69</dc:creator>
      <dc:date>2023-05-19T02:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876518#M346287</link>
      <description>&lt;P&gt;You are probably looking for a &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/n11m54nggvjybhn1w2a8mbczw04q.htm" target="_self"&gt;format&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly something like&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0c7jsl3orer8fn14dll459ifzmm.htm" target="_self"&gt;PERCENTw.d Format&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 17:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876518#M346287</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2023-05-18T17:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876521#M346289</link>
      <description>&lt;P&gt;&lt;STRONG&gt;[Admin Note]&lt;/STRONG&gt; Added links to format documentation&lt;BR /&gt;&lt;BR /&gt;Percentw.d or PercentNw.d. The &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0c7jsl3orer8fn14dll459ifzmm.htm" target="_self"&gt;Percentw.d format&lt;/A&gt; will place () around negative values so reserves two of the positions of the width for those. The &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p1dnjiagqol30jn18ln19co8meo9.htm" target="_self"&gt;PercentNwd. format&lt;/A&gt; uses a negative sign, hence the N in the name, for negative values and reserves one position for that.&lt;/P&gt;
&lt;P&gt;As an example if you want the format as a default. This only displays one decimal point in the percent.&lt;/P&gt;
&lt;P&gt;(Missed the inappropriate definition of variables a character)&lt;/P&gt;
&lt;PRE&gt; DATA  XYZ;
SET XYZ_V1;
KEEP DTS COD Q_1 Q_2 Q_3 Q_4 QPC_1 QPC_2 QPC_3 QPC_4 TOTAL_SUM;
&lt;STRIKE&gt;LENGTH QPC_1 QPC_2 QPC_3 QPC_4 $6;&lt;/STRIKE&gt;
QPC_1=Q_1/TOTAL_SUM;
QPC_2=Q_2/TOTAL_SUM;
QPC_3=Q_3/TOTAL_SUM;
QPC_4=Q_4/TOTAL_SUM;
format Qpc_:  percentn8.1; 
RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 11:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876521#M346289</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-19T11:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876553#M346294</link>
      <description>&lt;P&gt;Why do you define variables which will hold the results of calculations as character?&lt;/P&gt;
&lt;P&gt;Remove the LENGTH statement and use a FORMAT statement with PERCENT7.2 instead.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 19:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876553#M346294</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-18T19:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876592#M346304</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.2.PNG" style="width: 955px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84119i619F846472CC1519/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.2.PNG" alt="Capture2.2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I use format percent7.2, this type of error message shows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 02:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876592#M346304</guid>
      <dc:creator>Brownisiak69</dc:creator>
      <dc:date>2023-05-19T02:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876593#M346305</link>
      <description>As tried the query provided by you worked successfully, much more thanks for your help and support.</description>
      <pubDate>Fri, 19 May 2023 02:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876593#M346305</guid>
      <dc:creator>Brownisiak69</dc:creator>
      <dc:date>2023-05-19T02:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876594#M346306</link>
      <description>&lt;P&gt;You have to tell the FORMAT statement what variable(s) you want the PERCENT format to be attached to.&amp;nbsp; It cannot read your mind.&amp;nbsp; That is why it is telling you that it is expecting a NAME or a variable list here it has indicated it detected the error.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 02:28:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876594#M346306</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-19T02:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: PERCENTAGE FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876595#M346307</link>
      <description>Yes, I get the result. The length statement hold my program, so I removed the length statement and added the format statement and got the result.</description>
      <pubDate>Fri, 19 May 2023 02:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-i-get-output-in-percentage-format/m-p/876595#M346307</guid>
      <dc:creator>Brownisiak69</dc:creator>
      <dc:date>2023-05-19T02:36:44Z</dc:date>
    </item>
  </channel>
</rss>

