I have come accross a problem regarding the computed columns from a tabulate procedure.
Basically, I would like column "Arrears Rate" to be calculated as "Arrears" / "Total Insured Amount" in each row of the table, but ONLY when there is an Insured Amount. If there are none, I would like the cell to be either empty or have a dot.
I've tried the conditionnal approach with IF statements (in the code itself or by running a summary table automated procedure from SAS EG). Nothing worked.
So, is there a way I can use conditionnal computed columns?
Difficult to reply without the actual data, but this works, if that's what you want:
CUS=1; ARREARS=1; INS=3; output;
CUS=1; ARREARS=1; INS=1; output;
CUS=2; ARREARS=1; INS=0; output;
option nocenter formchar='|========================';
var ARREARS INS;
table CUS, ARREARS*sum INS*sum ARREARS*pctsum