<?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: proc tabulate - print reports in order in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261763#M15538</link>
    <description>&lt;P&gt;Show the exact code you used. The order of variables in the table statement is important. And while Tabulate will supporat BY variables often it is best to use those as CLASS variables and provide them in a page dimension.&lt;/P&gt;
&lt;P&gt;Order of appearance will depend upon Order=options and the order variables appear in parts of the proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you provide some example data in the form of a datastep we can test and provide exact code.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2016 14:49:31 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-04-06T14:49:31Z</dc:date>
    <item>
      <title>proc tabulate - print reports in order</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261701#M15532</link>
      <description>&lt;P&gt;Hi SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset that has gender groups (0, 1) nested in departments.&lt;/P&gt;&lt;P&gt;I'd like to use Proc Tabulate to generate some reports by department and by gender.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I need to produce:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1:&lt;/P&gt;&lt;P&gt;Account department, Male&lt;/P&gt;&lt;P&gt;N, 1 Year Retention, 2 Year Retention&lt;/P&gt;&lt;P&gt;20, 20%, 30%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2:&lt;/P&gt;&lt;P&gt;Account department, Female&lt;/P&gt;&lt;P&gt;N, 1 Year Retention, 2 Year Retention&lt;/P&gt;&lt;P&gt;40, 22%, 30%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 3:&lt;/P&gt;&lt;P&gt;Payroll department, Male&lt;/P&gt;&lt;P&gt;N, 1 Year Retention, 2 Year Retention&lt;/P&gt;&lt;P&gt;40, 21%, 10%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc. etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, using proc tabulate&lt;/P&gt;&lt;P&gt;by department gender ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gives me tables in the following undesired order:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account department, Male&lt;/P&gt;&lt;P&gt;Payroll department, Male&lt;/P&gt;&lt;P&gt;Account department, Female&lt;/P&gt;&lt;P&gt;Payroll department, Female&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really want:&lt;/P&gt;&lt;P&gt;Account department, Male&lt;/P&gt;&lt;P&gt;Account department, Female&lt;/P&gt;&lt;P&gt;Payroll department, Male&lt;/P&gt;&lt;P&gt;Payroll department, Female&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 13:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261701#M15532</guid>
      <dc:creator>lin39</dc:creator>
      <dc:date>2016-04-06T13:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate - print reports in order</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261740#M15537</link>
      <description>&lt;P&gt;From what you write&amp;nbsp;your output should be as desired. Do&amp;nbsp;your variables have formats perhaps? The ordering can be accordiung to unformatted values. Anyways please&amp;nbsp;share your code and data. No doubt with more info the issue will be resolved quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards, Jan.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 14:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261740#M15537</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2016-04-06T14:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate - print reports in order</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261763#M15538</link>
      <description>&lt;P&gt;Show the exact code you used. The order of variables in the table statement is important. And while Tabulate will supporat BY variables often it is best to use those as CLASS variables and provide them in a page dimension.&lt;/P&gt;
&lt;P&gt;Order of appearance will depend upon Order=options and the order variables appear in parts of the proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you provide some example data in the form of a datastep we can test and provide exact code.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 14:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261763#M15538</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-06T14:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate - print reports in order</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261968#M15556</link>
      <description>&lt;PRE&gt;
1)Use proc tabulate option :   Order=DATA 
2)Padding some white blank before the value to customize the order .

&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:49:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-tabulate-print-reports-in-order/m-p/261968#M15556</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-07T01:49:27Z</dc:date>
    </item>
  </channel>
</rss>

