Hi everyone, I am hoping you can assist me without viewing my data. I am trying to get the max of a variable when a number is lower than a certain figure (the number represents difference in dates). I am getting an error that I cannot figure out tho: proc sql;
create table data_4 as select customer_id, CLASSIFICATION, EXTR, RISK_SCORE, calendar_month, date,
max(date) as max_date format date9., intck('month', date, CALCULATED max_date) as date_diff, cc,
max(case when CALCULATED date_diff le 3 then cc else 0 end) as Low_cc_l3,
max(case when CALCULATED date_diff le 6 then cc else 0 end) as Low_cc_l6,
max(case when CALCULATED date_diff le 12 then cc else 0 end) as Low_cc_l12
from data_3 group by customer_id order by customer_id, calendar_month;
quit; The error I am getting is: ERROR: Summary functions nested in this way are not supported. ERROR: Summary functions nested in this way are not supported. ERROR: Summary functions nested in this way are not supported. I am trying to return the maximum CC in last 3, 6, 12 months. Any help is appreciated. Thanks
... View more