Hi All,
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.
Here is the data structure
District Name - Group
School Name - Group
School Code - Group
Grade - Group
Demo Info - Group (Male, female, etc...)
Performance Level - Across (% and count).
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
PROC REPORT DATA=DISAGS NOWD
HEADLINE HEADSKIP;
TITLE1 'School Report';
TITLE2 ' Spring 2008';
COLUMN SCHLCODE DIST SCHOOL DEMOVAR GRADE
PLVL ,(n pctn) ;
DEFINE DIST / GROUP NOPRINT;
DEFINE SCHOOL / GROUP NOPRINT;
DEFINE SCHLCODE/ GROUP NOPRINT;
DEFINE GRADE / GROUP NOPRINT;
DEFINE DEMOVAR / ORDER;
DEFINE DEMOVAR / GROUP;
DEFINE DEMOVAR / '% of Student Results' format = $char22.;
DEFINE PLVL / ACROSS Performance Level';
DEFINE PCTN / '% ' format=percent7.2;
WHERE RGRADE = '11' AND RSUPCD = ' ';
COMPUTE BEFORE _PAGE_/RIGHT;
LINE @04 'Grade : ' GRADE $char02.;
LINE @04 'Home District Name : ' DIST $char30.;
LINE @04 'Home School Name : ' SCHOOL $char30.;
LINE @04 'Home School Code : ' SCHLCODE $char12.;
ENDCOMP;
BREAK AFTER SCHLCD / PAGE;
RUN;
The output looks like this
> ------------------------------- 1-Mstry 4-Entry
> % of Student Results n % n %
> --------------------------------------------------------------
> 01 All Students 8 50.0% 1 50.0%
> 02 Female 5 31.3% . .
> 03 Male 3 18.8% 1 50.0%
I was expecting like this
> ------------------------------- 1-Mstry 4-Entry
> % of Student Results n % n %
> --------------------------------------------------------------
> 01 All Students 8 88.9% 1 11.1%
> 02 Female 5 100.0% . .
> 03 Male 3 75.0% 1 25.0%
Appreciate Any help
MK