<?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 How to get Row Percentage in PROC REPORT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-Row-Percentage-in-PROC-REPORT/m-p/27787#M4362</link>
    <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to create a summary report in Mainframes to get the percentage, i have used the "pctn" statistical keyword, but instead of giving "Row Percentage" its giving "Column Percentage". I tried rowpctn as well but its not giving any percentage at all.&lt;BR /&gt;
&lt;BR /&gt;
Here is the data structure&lt;BR /&gt;
&lt;BR /&gt;
District Name  - Group&lt;BR /&gt;
School Name  - Group&lt;BR /&gt;
School Code  - Group&lt;BR /&gt;
Grade           - Group &lt;BR /&gt;
Demo Info     - Group (Male, female, etc...)&lt;BR /&gt;
Performance Level - Across (% and count).&lt;BR /&gt;
&lt;BR /&gt;
There can be 4 different performace level and I am trying to report the percentage of different performance levels for male, female... When I run my report, instead of getting percentage distribution rolled up to 100%  @ row level, I am getting percentage distribution rolled up to 100%  @ Column level. Here is my code&lt;BR /&gt;
&lt;BR /&gt;
PROC REPORT DATA=DISAGS NOWD                                        &lt;BR /&gt;
     HEADLINE HEADSKIP;                                             &lt;BR /&gt;
                                                                    &lt;BR /&gt;
     TITLE1 'School Report';                         &lt;BR /&gt;
     TITLE2 ' Spring 2008';                               &lt;BR /&gt;
                                                                    &lt;BR /&gt;
     COLUMN SCHLCODE DIST SCHOOL DEMOVAR GRADE&lt;BR /&gt;
            PLVL ,(n pctn) ;                                     &lt;BR /&gt;
                                                                    &lt;BR /&gt;
     DEFINE DIST    / GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE SCHOOL  / GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE SCHLCODE/ GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE GRADE   / GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE DEMOVAR / ORDER;                                       &lt;BR /&gt;
         DEFINE DEMOVAR / GROUP;                                       &lt;BR /&gt;
         DEFINE DEMOVAR / '% of Student Results' format = $char22.;    &lt;BR /&gt;
         DEFINE PLVL     / ACROSS  Performance Level';         &lt;BR /&gt;
         DEFINE PCTN     /  '% ' format=percent7.2;                  &lt;BR /&gt;
                                                                        &lt;BR /&gt;
         WHERE RGRADE = '11' AND RSUPCD = '   ';                        &lt;BR /&gt;
                                                                        &lt;BR /&gt;
         COMPUTE BEFORE _PAGE_/RIGHT;                                   &lt;BR /&gt;
             LINE @04 'Grade              : ' GRADE  $char02.;         &lt;BR /&gt;
             LINE @04 'Home District Name : ' DIST   $char30.;         &lt;BR /&gt;
             LINE @04 'Home School Name   : ' SCHOOL $char30.;         &lt;BR /&gt;
           LINE @04 'Home School Code   : ' SCHLCODE $char12.;         &lt;BR /&gt;
       ENDCOMP;                                                       &lt;BR /&gt;
                                                                      &lt;BR /&gt;
       BREAK AFTER SCHLCD / PAGE;                                     &lt;BR /&gt;
       RUN;                                                           &lt;BR /&gt;
&lt;BR /&gt;
The output looks like this&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;   -------------------------------           1-Mstry             4-Entry           &lt;BR /&gt;
&amp;gt;  % of Student Results                n        %           n        %     &lt;BR /&gt;
&amp;gt;  --------------------------------------------------------------     &lt;BR /&gt;
                                                                   &lt;BR /&gt;
&amp;gt;  01 All Students                      8   50.0%           1   50.0%      &lt;BR /&gt;
&amp;gt;  02 Female                             5   31.3%           .     .        &lt;BR /&gt;
&amp;gt;  03 Male                                 3   18.8%           1   50.0%      &lt;BR /&gt;
&lt;BR /&gt;
I was expecting like this&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;   -------------------------------           1-Mstry             4-Entry           &lt;BR /&gt;
&amp;gt;  % of Student Results                n        %           n        %     &lt;BR /&gt;
&amp;gt;  --------------------------------------------------------------     &lt;BR /&gt;
                                                                   &lt;BR /&gt;
&amp;gt;  01 All Students                      8   88.9%           1   11.1%      &lt;BR /&gt;
&amp;gt;  02 Female                             5   100.0%           .     .        &lt;BR /&gt;
&amp;gt;  03 Male                                 3   75.0%           1   25.0%      &lt;BR /&gt;
&lt;BR /&gt;
Appreciate Any help &lt;BR /&gt;
MK</description>
    <pubDate>Wed, 25 Jun 2008 19:43:51 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-06-25T19:43:51Z</dc:date>
    <item>
      <title>How to get Row Percentage in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-Row-Percentage-in-PROC-REPORT/m-p/27787#M4362</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to create a summary report in Mainframes to get the percentage, i have used the "pctn" statistical keyword, but instead of giving "Row Percentage" its giving "Column Percentage". I tried rowpctn as well but its not giving any percentage at all.&lt;BR /&gt;
&lt;BR /&gt;
Here is the data structure&lt;BR /&gt;
&lt;BR /&gt;
District Name  - Group&lt;BR /&gt;
School Name  - Group&lt;BR /&gt;
School Code  - Group&lt;BR /&gt;
Grade           - Group &lt;BR /&gt;
Demo Info     - Group (Male, female, etc...)&lt;BR /&gt;
Performance Level - Across (% and count).&lt;BR /&gt;
&lt;BR /&gt;
There can be 4 different performace level and I am trying to report the percentage of different performance levels for male, female... When I run my report, instead of getting percentage distribution rolled up to 100%  @ row level, I am getting percentage distribution rolled up to 100%  @ Column level. Here is my code&lt;BR /&gt;
&lt;BR /&gt;
PROC REPORT DATA=DISAGS NOWD                                        &lt;BR /&gt;
     HEADLINE HEADSKIP;                                             &lt;BR /&gt;
                                                                    &lt;BR /&gt;
     TITLE1 'School Report';                         &lt;BR /&gt;
     TITLE2 ' Spring 2008';                               &lt;BR /&gt;
                                                                    &lt;BR /&gt;
     COLUMN SCHLCODE DIST SCHOOL DEMOVAR GRADE&lt;BR /&gt;
            PLVL ,(n pctn) ;                                     &lt;BR /&gt;
                                                                    &lt;BR /&gt;
     DEFINE DIST    / GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE SCHOOL  / GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE SCHLCODE/ GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE GRADE   / GROUP NOPRINT;                               &lt;BR /&gt;
         DEFINE DEMOVAR / ORDER;                                       &lt;BR /&gt;
         DEFINE DEMOVAR / GROUP;                                       &lt;BR /&gt;
         DEFINE DEMOVAR / '% of Student Results' format = $char22.;    &lt;BR /&gt;
         DEFINE PLVL     / ACROSS  Performance Level';         &lt;BR /&gt;
         DEFINE PCTN     /  '% ' format=percent7.2;                  &lt;BR /&gt;
                                                                        &lt;BR /&gt;
         WHERE RGRADE = '11' AND RSUPCD = '   ';                        &lt;BR /&gt;
                                                                        &lt;BR /&gt;
         COMPUTE BEFORE _PAGE_/RIGHT;                                   &lt;BR /&gt;
             LINE @04 'Grade              : ' GRADE  $char02.;         &lt;BR /&gt;
             LINE @04 'Home District Name : ' DIST   $char30.;         &lt;BR /&gt;
             LINE @04 'Home School Name   : ' SCHOOL $char30.;         &lt;BR /&gt;
           LINE @04 'Home School Code   : ' SCHLCODE $char12.;         &lt;BR /&gt;
       ENDCOMP;                                                       &lt;BR /&gt;
                                                                      &lt;BR /&gt;
       BREAK AFTER SCHLCD / PAGE;                                     &lt;BR /&gt;
       RUN;                                                           &lt;BR /&gt;
&lt;BR /&gt;
The output looks like this&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;   -------------------------------           1-Mstry             4-Entry           &lt;BR /&gt;
&amp;gt;  % of Student Results                n        %           n        %     &lt;BR /&gt;
&amp;gt;  --------------------------------------------------------------     &lt;BR /&gt;
                                                                   &lt;BR /&gt;
&amp;gt;  01 All Students                      8   50.0%           1   50.0%      &lt;BR /&gt;
&amp;gt;  02 Female                             5   31.3%           .     .        &lt;BR /&gt;
&amp;gt;  03 Male                                 3   18.8%           1   50.0%      &lt;BR /&gt;
&lt;BR /&gt;
I was expecting like this&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;   -------------------------------           1-Mstry             4-Entry           &lt;BR /&gt;
&amp;gt;  % of Student Results                n        %           n        %     &lt;BR /&gt;
&amp;gt;  --------------------------------------------------------------     &lt;BR /&gt;
                                                                   &lt;BR /&gt;
&amp;gt;  01 All Students                      8   88.9%           1   11.1%      &lt;BR /&gt;
&amp;gt;  02 Female                             5   100.0%           .     .        &lt;BR /&gt;
&amp;gt;  03 Male                                 3   75.0%           1   25.0%      &lt;BR /&gt;
&lt;BR /&gt;
Appreciate Any help &lt;BR /&gt;
MK</description>
      <pubDate>Wed, 25 Jun 2008 19:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-Row-Percentage-in-PROC-REPORT/m-p/27787#M4362</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-06-25T19:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Row Percentage in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-Row-Percentage-in-PROC-REPORT/m-p/27788#M4363</link>
      <description>I have done this myself in a roundabout fashion. I have created PCT_ROW using FREQ procedured and directed the output to a SAS dataset, then I used REPORT PROC to create a report.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
MK</description>
      <pubDate>Wed, 02 Jul 2008 17:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-Row-Percentage-in-PROC-REPORT/m-p/27788#M4363</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-02T17:56:19Z</dc:date>
    </item>
  </channel>
</rss>

