<?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 summary report in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629008#M20701</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a input file(have.xlsx) that has ID by date. I am looking to produce summary report by date that has count of ID by different market groups(PHL,NUC,MKT,MRC,DRA). I need help with generating the desired output(results.xlsx) with totals at the end. I also want to output the data by each market group in the same file if the total of any market group is greater than zero. Basically print the rows with count greater than zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to summary reporting so any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;</description>
    <pubDate>Tue, 03 Mar 2020 03:02:33 GMT</pubDate>
    <dc:creator>Cbob03</dc:creator>
    <dc:date>2020-03-03T03:02:33Z</dc:date>
    <item>
      <title>summary report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629008#M20701</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a input file(have.xlsx) that has ID by date. I am looking to produce summary report by date that has count of ID by different market groups(PHL,NUC,MKT,MRC,DRA). I need help with generating the desired output(results.xlsx) with totals at the end. I also want to output the data by each market group in the same file if the total of any market group is greater than zero. Basically print the rows with count greater than zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to summary reporting so any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 03:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629008#M20701</guid>
      <dc:creator>Cbob03</dc:creator>
      <dc:date>2020-03-03T03:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: summary report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629026#M20702</link>
      <description>&lt;P&gt;Please post the data you have as dataset using datalines, also post the expected result in the same form or as screenshot. I won't open any office-documents.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 06:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629026#M20702</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-03-03T06:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: summary report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629076#M20707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/207568"&gt;@Cbob03&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an approach to achieve this form the input dataset HAVE:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have sum noprint;
	var MKT PHL MRC DRA NUC;
	class dt;
	ways 1;
	output out=want (drop=_:) sum=MKT PHL MRC DRA NUC;
quit;

%macro print_market (market);
	ods excel options(sheet_name="&amp;amp;market");
	proc print data=have;
		title "&amp;amp;market";
		var dt;
		ID ID;
		where &amp;amp;market &amp;gt; 0;
	run;
%mend;

/* Report */

ods excel file='/PATH/results.xlsx' options (sheet_name="Summary") /* &amp;lt;--- update PATH */ ;

	proc print data=want;
		title "Summary";
		id dt;
		sum MKT PHL MRC DRA NUC;
	run;

	%print_market(MKT)
	%print_market(PHL)
	%print_market(MRC)
	%print_market(DRA)
	%print_market(NUC)
;

ods excel close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 10:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629076#M20707</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-03-03T10:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: summary report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629680#M20769</link>
      <description>Thank you very much!!</description>
      <pubDate>Thu, 05 Mar 2020 02:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/summary-report/m-p/629680#M20769</guid>
      <dc:creator>Cbob03</dc:creator>
      <dc:date>2020-03-05T02:41:10Z</dc:date>
    </item>
  </channel>
</rss>

