Hi, I've tried implementing the following code, but have received an error regarding the size of the data. I have attached the error below and have subsequently selected 'no'. Just wandering because of this, this could explain why the proc report step hadn't run hence why the 'Rulehits' was the final output? I've also tried to group by the rule name (which was originally intended) in proc report , which has eliminated the data capacity error but still hasn't ordered the 'Adverse %' column. As below the 'Adverse' column had already been ordered in the proc sql stage, so am a bit confused as to why it hasn't ordered in the proc report stage by default. Thanks, /* Assigning Libname */ libname SIRA 'E:\SAS_BI\CFAD\DATA'; Data SAS_Extract; Set SIRA.SIRA_SCORES; policy_number_1 = substr(policy_number,verify(policy_number,'0')); run; Proc sql; create table RULEHIT as select distinct policy_number, rule_name, case when action_status in ('Fraud ','Inconsistency','Suspect') then 1 else 0 end as Adverse from SAS_EXTRACT run; proc sql; create table RULEHITS as Select RH.Policy_Number, Adverse, rule_name from RULEHIT RH group by RH.Policy_Number order by Adverse descending; quit; proc report data= RULEHITS split="~" style(header)=[vjust=b] nowd headline headskip; title1 "Fraud Rates For Most Common SIRA Rule Hits"; column rule_name n Adverse Adverse=pct; define rule_name / order order=data 'Rule Name'; define n /'N'; define Adverse / analysis Sum 'Adverse'; define Pct / analysis mean format = percent9.2 'Adverse %'; rbreak after / Summarize; Compute after; rule_name = 'Total'; endcomp; run;
... View more