<?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: dividing the dataset by site in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/dividing-the-dataset-by-site/m-p/18484#M3639</link>
    <description>Hi:&lt;BR /&gt;
  There are a few things you could do:&lt;BR /&gt;
1) put BY SITE; in the PROC TABULATE step (assuming the data are sorted by site)&lt;BR /&gt;
    &lt;BR /&gt;
2) if you want SITE in the page dimension (then do NOT use the BY statement) then you would use SITE as a separate dimension:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table site,&lt;BR /&gt;
      primcare,&lt;BR /&gt;
      tot_chg*(n sum);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                &lt;BR /&gt;
3) If you want SITE in the ROW dimension then:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table site * primcare,&lt;BR /&gt;
      tot_chg*(n sum);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                        &lt;BR /&gt;
4) If you want SITE in the COL dimension then:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table primcare,&lt;BR /&gt;
      site*tot_chg*(n sum);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                  &lt;BR /&gt;
It really depends on what you mean when you say "dividing ... by site".&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 14 Apr 2009 20:12:35 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2009-04-14T20:12:35Z</dc:date>
    <item>
      <title>dividing the dataset by site</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividing-the-dataset-by-site/m-p/18483#M3638</link>
      <description>I have the following procedure and wanted to divide the out by site;&lt;BR /&gt;
&lt;BR /&gt;
proc tabulate data = report.fourb;&lt;BR /&gt;
&lt;BR /&gt;
class primcare;&lt;BR /&gt;
var tot_chg;&lt;BR /&gt;
var amt_pd;&lt;BR /&gt;
table primcare,&lt;BR /&gt;
tot_chg*(n sum);&lt;BR /&gt;
table primcare,&lt;BR /&gt;
amt_pd*(n sum);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
where should I put the by site code?  Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
RQ</description>
      <pubDate>Tue, 14 Apr 2009 17:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividing-the-dataset-by-site/m-p/18483#M3638</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-14T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: dividing the dataset by site</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividing-the-dataset-by-site/m-p/18484#M3639</link>
      <description>Hi:&lt;BR /&gt;
  There are a few things you could do:&lt;BR /&gt;
1) put BY SITE; in the PROC TABULATE step (assuming the data are sorted by site)&lt;BR /&gt;
    &lt;BR /&gt;
2) if you want SITE in the page dimension (then do NOT use the BY statement) then you would use SITE as a separate dimension:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table site,&lt;BR /&gt;
      primcare,&lt;BR /&gt;
      tot_chg*(n sum);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                &lt;BR /&gt;
3) If you want SITE in the ROW dimension then:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table site * primcare,&lt;BR /&gt;
      tot_chg*(n sum);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                        &lt;BR /&gt;
4) If you want SITE in the COL dimension then:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table primcare,&lt;BR /&gt;
      site*tot_chg*(n sum);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                  &lt;BR /&gt;
It really depends on what you mean when you say "dividing ... by site".&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 14 Apr 2009 20:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividing-the-dataset-by-site/m-p/18484#M3639</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-04-14T20:12:35Z</dc:date>
    </item>
  </channel>
</rss>

