<?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: summary problem in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469724#M30459</link>
    <description>&lt;P&gt;Do you mean you are after this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;

set sashelp.prdsal2;

sale=0; 

if actual&amp;gt; predict then sale=.; run;



proc freq data=test noprint;
tables country*sale/missing out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jun 2018 19:29:17 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-06-12T19:29:17Z</dc:date>
    <item>
      <title>summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469720#M30458</link>
      <description>&lt;P&gt;Hi, I am doing summary for each columns and want to know missing and non-missing percentage in the data. I have to classify it on country level.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I have to calculate percentage of missing and non-missing sale (another variable in my data) on country level.&amp;nbsp; Can anyone help please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;

set sashelp.prdsal2;

sale=0;&amp;nbsp;

if actual&amp;gt; predict then sale=.; run;

proc summary data=test;

class country;

var sale;

run;

&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 19:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469720#M30458</guid>
      <dc:creator>TanviG</dc:creator>
      <dc:date>2018-06-12T19:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469724#M30459</link>
      <description>&lt;P&gt;Do you mean you are after this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;

set sashelp.prdsal2;

sale=0; 

if actual&amp;gt; predict then sale=.; run;



proc freq data=test noprint;
tables country*sale/missing out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 19:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469724#M30459</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-12T19:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469725#M30460</link>
      <description>&lt;P&gt;No, as per my problem I want to calculate percentage within each country assuming each country has 100% population and within country missing and non-missing percentage.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 19:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469725#M30460</guid>
      <dc:creator>TanviG</dc:creator>
      <dc:date>2018-06-12T19:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469728#M30461</link>
      <description>&lt;P&gt;You might need PROC TABULATE&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TABULATE DATA=WORK.TEST;
	CLASS COUNTRY /	ORDER=UNFORMATTED MISSING;
	CLASS sale /	ORDER=UNFORMATTED MISSING ;
	TABLE COUNTRY,sale*RowPctN ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 19:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469728#M30461</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-12T19:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469739#M30462</link>
      <description>Thanks. It worked! I am assuming if there are more than one variable and if for each variable I need to calculate the missing percentage..how it will work? Do I need to write table statement again? and if I am taking it into the output data set then can I write out= within the proc statement?&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Jun 2018 20:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469739#M30462</guid>
      <dc:creator>TanviG</dc:creator>
      <dc:date>2018-06-12T20:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469741#M30463</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TABULATE DATA=WORK.TEST out=best (drop=_type_  _page_ _table_);
	CLASS COUNTRY /	ORDER=UNFORMATTED MISSING;
	CLASS sale /	ORDER=UNFORMATTED MISSING ;
	class resale/ ORDER=UNFORMATTED MISSING ;
	TABLE COUNTRY,sale*RowPctN ;
	table COUNTRY,resale* RowPctN;
RUN;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 20:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469741#M30463</guid>
      <dc:creator>TanviG</dc:creator>
      <dc:date>2018-06-12T20:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469748#M30465</link>
      <description>Any more feasible and time efficient solution is welcome!</description>
      <pubDate>Tue, 12 Jun 2018 20:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469748#M30465</guid>
      <dc:creator>TanviG</dc:creator>
      <dc:date>2018-06-12T20:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469756#M30466</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TABULATE DATA=WORK.TEST;
	CLASS COUNTRY /	ORDER=UNFORMATTED MISSING;
	CLASS resale /	ORDER=UNFORMATTED MISSING;
	CLASS sale /	ORDER=UNFORMATTED MISSING ;
	TABLE /* Row */ COUNTRY,
		  /* Col */ sale*RowPctN resale*RowPctN ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check how row's and Columns are controlled&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 20:43:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/469756#M30466</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-12T20:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: summary problem</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/470065#M30492</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83078"&gt;@SuryaKiran&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TABULATE DATA=WORK.TEST;
	CLASS COUNTRY /	ORDER=UNFORMATTED MISSING;
	CLASS resale /	ORDER=UNFORMATTED MISSING;
	CLASS sale /	ORDER=UNFORMATTED MISSING ;
	TABLE /* Row */ COUNTRY,
		  /* Col */ sale*RowPctN resale*RowPctN ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check how row's and Columns are controlled&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Or for variables that you are doing the same things for group with () and you can have multiple variables on a single CLASS statement as long as all options are the same&lt;/P&gt;
&lt;PRE&gt;PROC TABULATE DATA=WORK.TEST;
	CLASS COUNTRY /	ORDER=UNFORMATTED MISSING;
	CLASS resale sale /	ORDER=UNFORMATTED MISSING;
	TABLE  COUNTRY,
		   (sale resale)*RowPctN ;
RUN;&lt;/PRE&gt;
&lt;P&gt;Proc tabulate will also honor variable lists such as QR:, var1-var9 &amp;nbsp;or ThisVar--ThatVar&amp;nbsp;to use all variables in the list in Class and Var statements as well as in the Table definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;You can also use the special variable lists _numeric_ or _character_ .&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 19:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/summary-problem/m-p/470065#M30492</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-13T19:49:09Z</dc:date>
    </item>
  </channel>
</rss>

