<?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: Format results of Pro Freg in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485014#M125962</link>
    <description>&lt;P&gt;I suppose you could always diivide your weight values by 1,000,000 before running PROC FREQ.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2018 06:45:19 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-08-08T06:45:19Z</dc:date>
    <item>
      <title>Format results of Pro Freg</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485004#M125953</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the scripts below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=work.loan_overdue;
     tables report_date/nopercent nocum frmat=comma16.0;
     weight 'total_amount';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however, the results showed that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;REPORT DATE &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; Freq&lt;/P&gt;&lt;P&gt;01/08/2018&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;5.702E10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;02/08/2018&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;5.881E10&lt;/P&gt;&lt;P&gt;03/08/2018&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;6.378E10&lt;/P&gt;&lt;P&gt;04/08/2018&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 6.198E10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;05/08/2018&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;5.979E10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help to instruct me how to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. show the format of Freq in "#,###.##" (for eg. 15,244,463,123.12)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. show the Freq with unit Million. (for eg. 15,244.46)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank everyone.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485004#M125953</guid>
      <dc:creator>Tri_Luong</dc:creator>
      <dc:date>2018-08-08T06:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Format results of Pro Freg</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485009#M125957</link>
      <description>&lt;P&gt;The most flexible way would be to create an output data set instead of a report.&amp;nbsp; For example, change the TABLE statement to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tables report_date / noprint out=want (keep=report_date count);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That gives you a data set named WANT with the variables REPORT_DATE and COUNT.&amp;nbsp; You could easily use that in a DATA step, and divide the COUNT values by 1,000,000 before printing.&amp;nbsp; And you could easily apply a format for printing COUNT.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485009#M125957</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-08T06:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Format results of Pro Freg</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485012#M125960</link>
      <description>&lt;P&gt;Thank Astounding for your prompt feedback. However, is there any way to change the format directly on the report instead of creating new data set?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485012#M125960</guid>
      <dc:creator>Tri_Luong</dc:creator>
      <dc:date>2018-08-08T06:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Format results of Pro Freg</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485014#M125962</link>
      <description>&lt;P&gt;I suppose you could always diivide your weight values by 1,000,000 before running PROC FREQ.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:45:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485014#M125962</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-08T06:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Format results of Pro Freg</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485015#M125963</link>
      <description>&lt;P&gt;Hi Astounding,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you mention that I should create one more variable which is "new value" = "original_value"/1,000,000 before proc freq with weight for "new value"? If I don't want to create new variable, what should I do?!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485015#M125963</guid>
      <dc:creator>Tri_Luong</dc:creator>
      <dc:date>2018-08-08T06:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Format results of Pro Freg</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485019#M125967</link>
      <description>&lt;P&gt;You could create it within a view, and make the view temporary.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data temp / view=temp;&lt;/P&gt;
&lt;P&gt;set work.loan_overdue;&lt;/P&gt;
&lt;P&gt;total_amount = total_amount / 1000000;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use the view in PROC FREQ:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=temp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The rest stays the same, and the VIEW is temporary, stored in the WORK area.&amp;nbsp; It doesn't save a copy of your data, just a set of instructions for how to process the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-results-of-Pro-Freg/m-p/485019#M125967</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-08T06:54:37Z</dc:date>
    </item>
  </channel>
</rss>

